in reply to Re: Problem with reading the total file into variable
in thread Problem with reading the total file into variable
seems nobody proposed it so here is a way to do it
{ local $/;#makes the separator variable undef #thus preventing perl from seeing \n as line separators while(<$fh>){ $var = $_; } }
this should read the whole file in one go into $var if I'm not mistaken
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Problem with reading the total file into variable
by Anonymous Monk on Aug 25, 2015 at 08:21 UTC | |
by QuillMeantTen (Friar) on Aug 25, 2015 at 09:03 UTC |