[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] a character at a time



>>Does anyone know of a way to get Perl to read in (say from a plain
>>ASCII text file) only a character at a time instead of a whole line at a
>>time?
>
>use read(), documented in perlfunc.

Or use getc:

#!perl;

open(FILE, "ascii.txt");
$char = getc(FILE);

__END__


___Carl_Johan_Berglund_________________________
   Adverb Information
   carl.johan.berglund@adverb.se
   http://www.adverb.se/



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch