in reply to File Sorting Question

sub my_sort_key { my $file = lc(shift); chomp $file; my $the_file =~ s/^the\s+//; $the_file; } my @files = map { $$_[1] } sort { $$a[0] cmp $$b[0] } map { [ my_sort_key($_), $_ ] } <INF>;
Update:Fixed. And I figure you probably only want to ignore 'The' if its a word, not a word prefix.(Ahh, wog is too quick for me :-)