True. I'd like to see a switch:
my $modified = s/$pattern/$change_to/gr;Where /r stands for 'replaced', or somesuch.
In reply to Re^3: Perl oddities (s/// doesn't DWIM in map)
by heptadecagram
in thread Perl oddities
by brian_d_foy
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |