I have a code which goes like this #!/usr/bin/perl -w use strict;
my @column; while (<DATA>) { push @column, (split)[0]; print join (' ', @column); } __DATA__ 1 a b c 2 d e f 3 g h i But when running this i get the output as : 11 21 2 3 Whereas i am trying to get the output as : 1 2 3 could you please suggest what i am doing wrong here? Regards.../om -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/