Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Need help to parse the text

by tachyon (Chancellor)
on Jun 17, 2004 at 04:29 UTC ( [id://367528]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    [root]# uname -s
    Linux
    ...
              TX packets:56540745 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:2665326103 (2541.8 Mb)  TX bytes:2665326103 (2541.8
    + Mb)
    
  2. or download this
    for my $chunk (split "\n\n", $data) {
        my ($if) = $chunk =~ m/^(\S+)/;
        my ($status) = $chunk =~ m/status:\s*(\S+)/;
        print "$if: $status\n";
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-24 10:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found