Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Parsing semi-erratic text

by ikegami (Patriarch)
on Aug 23, 2006 at 19:39 UTC ( [id://569191]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    while (<DATA>) {
       my ($key, $val) = /^\s*([^:]*?)\s*:\s*(.*?)\s*$/
    ...
    
       print("[$key:$val]\n");
    }
    
  2. or download this
    while (<DATA>) {
       my ($key, $val) = split(/:/, $_, 2);
    ...
    
       print("[$key:$val]\n");
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2024-03-28 19:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found