in reply to Re: Re: slurping into scalars
in thread slurping into scalars
Adds a second \n to every line. This may be what you are looking for. Seems a bit odd though.$_ = join("\n", <FILE>);
I have done this kind of thing (with some differences) when doing quick and dirty text->html output. Say you want to put <p> tags when you have blank lines but otherwise leave the text untouched then the folowing code works:
do {local $/ = $/.$/;print join('<p>', <FILE>);};
Dingus
|
---|