in reply to Re: Re: tutelage needed
in thread tutelage needed

I don't see an s modifier anywhere. Am I missing something?


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

Replies are listed 'Best First'.
Re: tutelage needed
by ctp (Beadle) on Jan 01, 2004 at 03:19 UTC
    $big_string =~ s/(\(|\))//g;

    after the tilde, before my too many parentheses
      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.
        thanks for the input...and especially the "perl idioms explained" link...I know I will be spending a ton of time reading in there!!