I'm still hobbled by my thinking in C problem so I'm looking for a way to do this.
I'm reading from a file and constructing an array of arrays. Here's an example of what's in the file: net localgroup Field Aidan /ADD net localgroup Internal Aidan /ADD net localgroup CM Aidan /ADD net localgroup DocAdmin dssey /add net localgroup DocAdmin cdavid /add net localgroup DocAdmin ktibbetts /add net localgroup DocAdmin skeefer /add net localgroup DocAdmin tschoberger /add net localgroup DocAdmin aod-ceni /add I want to sort the lines in the file by the 3rd column (Field, Internal, CM, DocAdmin) I'm reading the lines into an array and converting each line to an array so I can access the 3rd column. Once I do this I have a 2 dimensional array, but I can't de-reference the way I think it should work. (deja vu) my @lineArray; while(<F>) { # if the line is a net localgroup line add it to the array if( $_ =~ $s_criteria ) { print "FOUND localgroup line:-> $_\n"; split /\s/; push( @lineArray, @_ ); <---no it's an array of arrays. # print @lineArray; } I'd think I could access the third element of each row like this: $lineArray[$idx][2] but it doesn't work that way. Can someone set me straight or provide an alternate method? Thanks, -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>