Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Need help to parse the text

by tachyon (Chancellor)
on Jun 17, 2004 at 04:29 UTC ( #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? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2022-08-18 00:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?