Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: I would like to find a good logic to parse the data

by perleager (Pilgrim)
on May 25, 2007 at 04:15 UTC ( #617400=note: print w/ replies, xml ) Need Help??


in reply to I would like to find a good logic to parse the data

If you can't work around to getting a module to do this, perhaps you can just use this logic:

Read the Input file line by line, and if its the first line parse it in a different way. If not, then parse it normally by splitting the commas.

So if it detects its the first line, which is the "Submitted" values, then figure out some parsing method to read and print the values accordingly.

Perhaps use this logic:

($junk, $submit_values) = split(/Submitted,\"/, $first_line);
Then you'll be left with:
696,028","50,946","810,590","836,505","13,923,241","13,776,443","14,17 +9,619","14,614,558","14,704,885","14,634,911","15,055,774" ,"15,127,534","14,458,899","14,403,378","14,566,425","14,644,406","14 ,524,069"
Then you can parse the above by by splitting `","`:
my @values = split(/\",\"/, $submit_values); foreach my $v (@values) { print $v; }


perleager


Comment on Re: I would like to find a good logic to parse the data
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (11)
As of 2014-10-22 13:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (118 votes), past polls