in reply to Re^5: Regexp substitution using variables
in thread Regexp substitution using variables

And, as LanX showed in Re^3: Regexp substitution using variables, you can now try
$replacement = '@{[`ls`]}; # use dir on MSWin
or even rm -rf / or deltree or whatever the equivalent is. This is too strong.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^7: Regexp substitution using variables
by AnomalousMonk (Archbishop) on Nov 26, 2020 at 21:03 UTC

    I fully agree that trying to offer the "full power" of Perl regexes (or even string interpolation) is fraught with difficulties, dangers and dangerous difficulties. But MikeTaylor seems determined to forge ahead with the confidence of a sleepwalker. So be it; he's been warned.


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