Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

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; }


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2016-10-24 04:56 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (303 votes). Check out past polls.