in reply to Re^3: searching and replacing strings in a multi line variable
in thread searching and replacing strings in a multi line variable

How strange.
C:\Users\Bill\forums\monks>perl -v This is perl 5, version 24, subversion 1 (v5.24.1) built for MSWin32-x +64-multi-t hread Copyright 1987-2017, Larry Wall Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using "man perl" or "perldoc perl". If you have access to + the Internet, point your browser at http://www.perl.org/, the Perl Home Pa +ge. C:\Users\Bill\forums\monks>perl 1188497.pl Can't redeclare "my" in "my" at 1188497.pl line 11, near ", " Execution of 1188497.pl aborted due to compilation errors. C:\Users\Bill\forums\monks>
Bill

Replies are listed 'Best First'.
Re^5: searching and replacing strings in a multi line variable
by AnomalousMonk (Archbishop) on Apr 22, 2017 at 13:18 UTC

    Yeah, it's a version thing:

    c:\@Work\Perl\monks>perl -wMstrict -le "print qq{perl version: $]}; ;; F('hi', 'every', 'body'); ;; sub F { my (my $x, my $y, my $z) = @_; print qq{\U$x $y $z}; } " perl version: 5.014004 HI EVERY BODY
    I get the same back to 5.8.9.


    Give a man a fish:  <%-{-{-{-<