in reply to formatting help

finally, a node that i can help with *grin*
i'm assuming that there is no header row
in your text files
we will also assume you want to return columns
6, 12, and 18
while(<>){ # read through each file specified on the command line one + line at a time my @temp = split(',',$_); # take that one line and split it into a +n array determined by the commas my ($section,$value1,$value2) = ($temp[6],$temp[12],$temp[18]); # +set names to specific spots for readability $section =~ s/\"//g; # remove the ", you may have to remove 'g' to + make this work $value1 =~ s/\"//g; # it's off the top of my head ;) $value2 =~ s/\"//g; $ALLDATA{$section} = push [($value1,$value2)]; #put an array of tw +o numbers into an array those } # end while<> foreach my $key (sort keys %ALLDATA) { # go through each section (in o +rder) print "$key\n"; foreach my $array (@{$ALLDATA{$key}}) { print "\t"; foreach my $value (@{$ALLDATA{$key}[$array]} { print "$value,"; } print "\n"; } print "END_SECTION\n"; }
save the above line of code to a file
execute the command line
 perl progname.pl < datafilename >
  email me if it dosen't work achesser@nortelnetworks.com
i wrote that off the top of my head