in reply to Parsing a tab delimited file

use the join() function to recompose the splitted fields ?
while( my $line = <INPUT> ) { # get your columns my @fields = split( /\t/, $line ); doWhatYouWantWith( $fields[0], $fields[1] ); # recompose your line from the modified columns # with a tab separator print join( "\t", @fields ); }

Replies are listed 'Best First'.
Re: Re: Parsing a tab delimited file
by tachyon (Chancellor) on May 09, 2002 at 11:59 UTC

    Or perhaps just print $line perhaps? Why regenerate it - it's there already!

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print