Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: xcol

by graff (Chancellor)
on May 18, 2009 at 05:45 UTC ( [id://764582] : note . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    while (<STDIN>) {
        tr/\r\n//d;  # even better than chomp!
        print join( "\t", ( split /\t/ )[@ARGV] ), "\n";
  2. or download this
    while(<STDIN>) {
        last if /\t/;
    die "No tab-delimited fields found\n" unless ( /\t/ );