SPUG: Checking for ASCII files
Daryn Nakhuda
daryn at marinated.org
Tue May 15 13:40:22 CDT 2001
you can use the -T file test operator.. if (-T $file)
On Tue, 15 May 2001, Lorraine Johnson wrote:
> Hello,
>
> I'm sure this is an old question, but I'm obviously looking in the wrong
> place for the answer.... We develop under Windows then copy source to an
> HP-UX box to build. (Long story.) We're writing a Unix Perl script to
> navigate the directories and convert the Windows newlines to Unix newlines.
> We know all the pieces but one: What is the best way to determine if a file
> is ASCII or non-ASCII?
>
> Thanks!
>
> Lorraine
>
> Lorraine Johnson
> Senior Software Engineer
> Elektrobit Inc.
> lorraine.johnson at elektrobit.com
> www.elektrobit-usa.com
> v: (425) 445-1898
> f: (425) 376-0235
>
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
> Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
> Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
> For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
> Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
>
>
--
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
More information about the spug-list
mailing list