in reply to Regex match on implicit default variable ($_) in a script, not a one liner
Like this?:
#!/usr/bin/perl use strict; use warnings; use diagnostics; my $A = "abc\ndef\nghi\n"; ( my $B = $A ) =~ s/def\n//g; print "$B"; __END__ C:\test>1145825.pl abc ghi
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regex match on implicit default variable ($_) in a script, not a one liner
by nikosv (Deacon) on Oct 24, 2015 at 13:43 UTC | |
|
Re^2: Regex match on implicit default variable ($_) in a script, not a one liner
by Todd Chester (Scribe) on Oct 24, 2015 at 05:38 UTC | |
by hippo (Archbishop) on Oct 24, 2015 at 09:08 UTC | |
by BrowserUk (Patriarch) on Oct 24, 2015 at 06:31 UTC |