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

Re: Extracting Data from .txt file

by trizen (Hermit)
on Apr 25, 2012 at 22:58 UTC ( #967199=note: print w/ replies, xml ) Need Help??


in reply to Extracting Data from .txt file

my %data; while (<DATA>) { while (/\b([A-Z]{3})\s+\d+(?:\.\d+)?\(\s*(\d+)\)/g) { $data{$1} = $2; } } print $data{UAU}; # prints 206846


Comment on Re: Extracting Data from .txt file
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2015-07-03 23:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls