Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Bug in substitution operator?

by fullermd (Curate)
on Jan 11, 2009 at 08:22 UTC ( #735481=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    @s = ("foo bar baz") x 4;
    $bar = "rab";
    ...
    
    for $i (0..3)
    { print "$i -> '$s[$i]'\n"; }
    
  2. or download this
    0 -> 'foo eek baz'
    1 -> 'foo rab{1} baz'
    2 -> 'foo rab[1] baz'
    3 -> 'foo oof baz'
    
  3. or download this
    4 -> 'foo rab\[1] baz'
    
  4. or download this
    $s[4] =~ s{(bar)} [$bar\E\[1\]];
    
    4 -> 'foo rab[1] baz'
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://735481]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2014-08-31 08:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls