Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Question about parsing columns when using Text::CSV

by borisz (Canon)
on Jan 06, 2009 at 15:15 UTC ( #734456=note: print w/ replies, xml ) Need Help??


in reply to Question about parsing columns when using Text::CSV

Use sprintf to truncate the numbers.
my @columns = map { sprintf("%.3f", $_) } $csv->fields();
should work. untested
Boris

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (12)
As of 2016-07-26 16:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (238 votes). Check out past polls.