in reply to Re: Unable to match newline
in thread Unable to match newline

Thank you very much for your reply. Isn't "(?s)" the same as "/s" ?

How can I emulate the -z ("a data line ends in 0 byte, not newline") behavior of grep on Perl?

Replies are listed 'Best First'.
Re^3: Unable to match newline
by linuxer (Curate) on Nov 17, 2015 at 20:10 UTC

    Regarding the '(?s)': Good point. I must admit, I did not recognize (obviously) that. I'm not used to it. You're right.

    Regarding the "emulate the -z": Perl has a similar switch. Checkout perldoc perlrun and look for the first command switch description ;-)

    edit: s/command line/command/

      Thank you! Thank you! Thank you! Thank you!

      So all I needed was "perl -n0e"

      I plan to convert this mix of shell and perl program into a full perl version but that will be another day as I have to learn quite a few more things about perl :)