Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Regular Expression to Extract Anything from Colon Delimited String

by Your Mother (Archbishop)
on Oct 01, 2014 at 19:50 UTC ( [id://1102580]=note: print w/replies, xml ) Need Help??


in reply to Regular Expression to Extract Anything from Colon Delimited String

A snippet/approach for your bag of tricks (and in this case help you sort out if your data structures drift; if so, this approach won’t be enough)–

use strictures; use Data::Dump "dump"; my @col = qw( count grade position name date country age vacant ); my @records; for ( <DATA> ) { my %tmp; @tmp{@col} = split ":"; push @records, \%tmp; } dump \@records;
  • Comment on Re: Regular Expression to Extract Anything from Colon Delimited String
  • Download Code

Log In?
Username:
Password:

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

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

    No recent polls found