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

Re^5: How regex works in array mode?

by JavaFan (Canon)
on Apr 26, 2012 at 10:02 UTC ( #967293=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use 5.010;
    my @lines = ("ip:192.168.243.1", "ip:192.168.243.2" =~
    ...
    __END__
    ip:192.168.243.1
    ip:192.168.243.2
    
  2. or download this
    my @lines;
    $lines[0] = "ip:192.168.243.1";
    push @lines, $1 if "ip:192.168.243.2" =~ /(ip:[0-9]{1,3}\.[0-9]{1,3}\.
    +[0-9]{1,3}\.[0-9]{1,3})/;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://967293]
help
Chatterbox?
[ambrus]: Corion: really? Does that mean the Prima watcher objects behave as handles that stop the watcher when they're destroyed, just like AnyEvent expects?
[ambrus]: "all the bugs" -- hehe, good luck

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2016-12-09 08:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (149 votes). Check out past polls.