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

Re: [MacPerl] Read entire file?





Jim Correia wrote:
> 
> So I'm a c programmer, and my perl book is at the office.
----------
your perl documentation is also available on the machine perl is
installed on....



> 
> What is the best (fastest, clearest code) to read an entire file into a
> variable?  
-----------

open( HANDLE , "<$RelativeFilePath" ) or die "failed to open
$RelativeFilePath because $!";
@WholeFile = (<HANDLE>);

D

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org