in reply to Re: tutelage needed
in thread tutelage needed

Ah. That's the substitution operator, and it has absolutely nothing to do with how you read in the file. By the time that you call the substitution, the filehandle has already been read from. ;).

But, incedentally, if you pass a multi-line string to s/// it will go over the newlines without pause. So I guess it does kinda "treat the string as one line."

Anyhoo, for more slurping info check out the excellent tutorial at Perl Idioms Explained - my $string = do { local $/; <FILEHANDLE> };.


Who is Kayser Söze?
Code is (almost) always untested.

Replies are listed 'Best First'.
Re: Re: Re: tutelage needed
by ctp (Beadle) on Jan 04, 2004 at 05:09 UTC
    thanks for the input...and especially the "perl idioms explained" link...I know I will be spending a ton of time reading in there!!