Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Parsing Challenge

by MeowChow (Vicar)
on May 25, 2001 at 05:49 UTC ( [id://83208]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      my %hash = split /=|\b(?=\S+=)/, $data;
      $hash{$_} = [ split / /, $hash{$_} ] for keys %hash;
    
  2. or download this
      my %hash;
      $hash{$1} = [split / /, $2] while $data =~ /(\S+)=(.*?)(?=\S+=|$)/g;
    
  3. or download this
      my %hash;
      push @{$hash{$1}}, split / /, $2 while $data =~ /(\S+)=(.*?)(?=\S+=|
    +$)/g;
    

Log In?
Username:
Password:

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

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

    No recent polls found