in reply to About $/

No!

from perlvar

Remember: the value of $/ is a string, not a regex. awk has to be better for something. :-)

But you change $/ after each read line!

Cheers Rolf

( addicted to the Perl Programming Language)

Replies are listed 'Best First'.
Re^2: About $/
by gurpreetsingh13 (Scribe) on May 24, 2013 at 10:34 UTC
    Nested declaration may be what you are looking for.
    $/="\r"; my @splitted=(); while(<FH>){ local $/="\003"; push @splitted,split(/$\//,$_); }

      No need for the second local $/ and the first can be made even more local:

      my @splitted = do { local $/ = "\r"; map { split m/\003/ => $_, -1 } <>; };

      Enjoy, Have FUN! H.Merijn
      This way works very well! Thank you so much! :)