Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: How can you sysread an entire file?by ChemBoy (Priest) |
on Jan 13, 2006 at 00:59 UTC ( [id://522852]=note: print w/replies, xml ) | Need Help?? |
If you really want to put it all in an array at once, use this: @array = split /(?<=\r)/, $rec; If you don't have a compelling need to do that, though, then I would recommend processing it line by line:
Both of the above assume that you mean a carriage return, not a newline, when you say carriage return (and that you're not running this on a machine running Mac OS 9 or lower). If God had meant us to fly, he would *never* have given us the railroads. --Michael Flanders
In Section
Seekers of Perl Wisdom
|
|