Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Parsing output from a command

by codeacrobat (Chaplain)
on Mar 24, 2009 at 19:59 UTC ( [id://752952]=note: print w/replies, xml ) Need Help??


in reply to Parsing output from a command

how about a golfed one-liner ;-)
lscfg -vl hdisk*|perl -MList::Pairwise=mapp -00e'print mapp{$a=~/^(hdi +sk\d+)/&&"$1 ",$b=~/Serial Number[.]+(\w+)/m&&"$1\n"}<>'
update: List::Pairwise oneliner

print+qq(\L@{[ref\&@]}@{['@'x7^'!#2/"!4']});

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-25 20:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found