Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Extracting columns from line

by Athanasius (Archbishop)
on Oct 23, 2013 at 02:54 UTC ( [id://1059267]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $col = "";  
    foreach my $key (keys %sampleValue){
    ...
    }
    chop($col);
    print $col,"\n"; ## string of all the columns I am interested in
    
  2. or download this
    my @cols = sort values %sampleValue;
    
  3. or download this
    ## Reading the sample Value file
    while (<$IN>)
    ...
        my @line = split "\t";
        @line = @line[@cols];   # <-- Use array slice here
        ...
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-03-29 11:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found