Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Bug in substitution operator?

by fullermd (Priest)
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?
[LanX]: they need to be stronger to be felt in frankfurt ;-)
Discipulus boring meeting.. see you

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2017-01-18 10:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (161 votes). Check out past polls.