Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^2: Need help with a nested IF statement

by Anonymous Monk
on Nov 03, 2009 at 01:01 UTC ( [id://804593]=note: print w/replies, xml ) Need Help??


in reply to Re: Need help with a nested IF statement
in thread Need help with a nested IF statement

perltidy -pbp 804470
$ifconfig = "ifconfig -a"; @nic = qx |$ifconfig| or die( "Can't get info from ifconfig: " . $! ); foreach (@nic) { if (/^fjgi([\d.])/) { $device = $1; if (/inet ([\d.]+)/) { print "test $1\n"; $ip = $1; } print "Device $device has the IP Address of $ip\n"; } }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-03-29 13:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found