Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^3: Splitting Multiple files into arrays.

by rjt (Deacon)
on Jul 21, 2013 at 20:47 UTC ( #1045537=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Splitting Multiple files into arrays.
in thread Splitting Multiple files into arrays.

That data is tab-delimited, not space-delimited. I'd use Text::CSV for this.

use Text::CSV; my $csv = Text::CSV->new({ sep_char = "\t" }); my $array_ref = $csv->getline_all($fh); # OR... my @array = @{ $csv->getline_all($fh) };

You can easily adapt the loop constructs I suggested, above, or many of the other suggestions given by others, with this approach. Good luck.


Comment on Re^3: Splitting Multiple files into arrays.
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (9)
As of 2015-07-06 06:13 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 (70 votes), past polls