$/=undef; #sets the record separator to [undef] so i +t keeps reading #until there is nothing more to read open FILE, "<yourfile"; my $data=<FILE>; close FILE; $/="\n"; #set it back to \n so if you try to read f +rom the #terminal it only takes a line at a time
In reply to RE: How do I read an entire file into a variable?
by vroom
in thread How do I read an entire file into a variable?
by sgtbaker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |