On Apr 12, John Porter said: >print > map { substr($_,1) } > sort > map { > my $k = 4; > /gnome/ and $k = 2; > /session/ and $k--; > $k.$_ > } > <DATA>; That sorts the data within itself -- a possibly unwanted side effect. But I like the GR transform. It would need to be scalable though. -- MIDN 4/C PINYAN, NROTCURPI, US Naval Reserve japhy@pobox.com http://www.pobox.com/~japhy/ http://pinyaj.stu.rpi.edu/ PerlMonth - An Online Perl Magazine http://www.perlmonth.com/ The Perl Archive - Articles, Forums, etc. http://www.perlarchive.com/ ==== Want to unsubscribe from Fun With Perl? Well, if you insist... ==== Send email to <fwp-request@technofile.org> with message _body_ ==== unsubscribe