Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Find highest value

by Tux (Monsignor)
on Sep 19, 2012 at 14:33 UTC ( #994467=note: print w/ replies, xml ) Need Help??


in reply to Find highest value

Looking at your example code, the .txt file is TAB seperated. You could read it with DBD::CSV if you are slightly acquinted with SQL commands, that might be handy. Here's a start:

use DBI; my $dbh = DBI->connect ("dbi:CSV:", undef, undef, { f_dir => "Results/Classification", f_ext => ".txt/r", csv_sep_char => "\t", RaiseError => 1, PrintError => 1, }) or die $DBI::errstr; my $sth = $dbh->prepare ("select max (begin) from classesNormal where +nr = 2"); $sth->execute; my ($max) = $sth->fetchrow_array;

Enjoy, Have FUN! H.Merijn


Comment on Re: Find highest value
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2015-07-07 02:41 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 (86 votes), past polls