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
In reply to Re: Regex match on implicit default variable ($_) in a script, not a one liner
by BrowserUk
in thread Regex match on implicit default variable ($_) in a script, not a one liner
by Todd Chester
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |