Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: Interpolation of capture buffers not working when regex stored in variable

by ikegami (Pope)
on Jun 05, 2013 at 20:14 UTC ( #1037297=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    my $p = "$2$1";       # my $p = $2.$1;
                          # Doesn't change the value of $2 or $1.
  2. or download this
    my $p = "$ARGV[0]";   # my $p = "".$ARGV[0];
                          # Doesn't change the value of $ARGV[0].
  3. or download this
    use String::Interpolate qw( interpolate);
    my $t = $ARGV[0];
    my $p = interpolate($t);

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1037297]
erix just did a 12 km-run. Slow, but unstoppable!
[choroba]: My recent record is 10km in 1 hour :)
[perldigious]: Nice erix... perldigious' legs are so sore from portaging his kayak from place to place last weekend he can barely hobble 12m. :-)
[erix]: you're faster than me then :)
[erix]: well, at the moment, that is :)

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (9)
As of 2017-05-24 12:40 GMT
Find Nodes?
    Voting Booth?