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

Re: [MacPerl] Read entire file?



 >What is the best (fastest, clearest code) to read an entire file into a
 >variable?  I want to preserve whatever line endings were in the original

Welp, you could do:

    open(FILE, "<$path_to_file");
    my @loaded_file = <FILE>; close(FILE);

Is that what you meant?

Morbus Iff
.sig on other machine.
http://www.disobey.com/
http://www.gamegrene.com/


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