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

$big_string =~ s/(\(|\))//g;

after the tilde, before my too many parentheses

Replies are listed 'Best First'.
Re: Re: tutelage needed
by jweed (Chaplain) on Jan 01, 2004 at 07:22 UTC
    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!!