Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Sorting Tab file

by ar0n (Priest)
on Apr 25, 2002 at 05:43 UTC ( #161867=note: print w/ replies, xml ) Need Help??


in reply to Sorting Tab file

You needn't change the split, but you could use a array slice in on the loop (only get the first and fifth column):

my $row = 0; while (<TABFILE>) { chomp; my @fld = split /\t/; my $col = 0; foreach my $token (@fld[0,4]) { $worksheet->write($row, $col, $token); $col++; } $row++; }


Comment on Re: Sorting Tab file
Download Code
Replies are listed 'Best First'.
Re: Re: Sorting Tab file
by raj8 (Sexton) on Apr 25, 2002 at 06:04 UTC
    Thanks for your reply. I have been searching CPAN and docs on a way to grab those elements. Once again, thanks -raj

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://161867]
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: (10)
As of 2015-07-08 02:30 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 (93 votes), past polls