Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- PERL 4.0 Reference Guide - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

     -loctnum
          enables automatic line-ending processing.  It  has  two
          effects:  first, it automatically chops the line termi-
          nator when used with -n or -p , and second, it  assigns
          $\ to have the value of octnum so that any print state-
          ments will have that line terminator added back on.  If
          octnum  is omitted, sets $\ to the current value of $/.
          For instance, to trim lines to 80 columns:

               perl -lpe 'substr($_, 80) = ""'

          Note that the assignment $\  =  $/  is  done  when  the
          switch  is processed, so the input record separator can
          be different than the output record separator if the -l
          switch is followed by a -0 switch:

               gnufind / -print0 | perl -ln0e 'print "found $_" if -p'

          This sets $\ to newline and then sets $/  to  the  null
          character.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson