Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: break out my foreach loop

by NetWallah (Abbot)
on Sep 03, 2012 at 00:12 UTC ( #991338=note: print w/ replies, xml ) Need Help??


in reply to break out my foreach loop

Somewhat more concise code:

my $octetstr; ($octetstr)= m/^Routing entry for\s+([\d\.]+)/ and last for @Output; die "No Routing address found in \@Output\n" unless $octetstr;
Update: If this is IPV4, you can extract the octets of the IP using
my @Route; @Route= m/^Routing entry for\s+(\d+)\.(\d+)\.(\d+)\.(\d+)/ and last fo +r @Output; die "No Routing address found in \@Output\n" unless @Route;

             I hope life isn't a big joke, because I don't get it.
                   -SNL


Comment on Re: break out my foreach loop
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (9)
As of 2014-10-22 22:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (122 votes), past polls