Peter Lemus asked:
> I need to read a huge two column file; I only need the
> data from the second column; I need to asign it a
> variable to that column, for example $FILE, how do go
> about doing this; I appreciate your help.
>
> the file looks like this
>
> md tony
> md ariba
> md arpa
If the second column always begins after the first space, try this:
open( INFILE, "$FILE" ) || die "Can't open $INFILE: $!\n";
while( <INFILE> ){
my ($garbage, $second_column) = split / /;
print $second_column . "\n";
}
and just ignore what you get in $garbage
-- Brian.