Greetings, I'm having some trouble using Sort::Maker and was hoping someone could assist.
I have very large arrays of file names that look like: my @ARRAY = qw{ 20060312.1230.goes10.ir.x.pacus.x.jpg 20060324.1500.goes10.ir.x.pacus.x.jpg 20060405.0000.goes10.ir.x.pacus.x.jpg 20060312.1300.goes10.ir.x.pacus.x.jpg 20060324.1530.goes10.ir.x.pacus.x.jpg 20060405.0030.goes10.ir.x.pacus.x.jpg 20060312.1330.goes10.ir.x.pacus.x.jpg } The following code works fine and produces a ST $sorter without problem: Very Cool!! #!/usr/local/bin/perl (5.8.8) use Sort::Maker ; my $sorter = &Sort::Maker::make_sorter(qw(ref_in ref_out), qw(ST), number, 'descending', 'unsigned_float', ) or die "Can't make sorter [EMAIL PROTECTED]"; #To see the output: my $sorted_array = $sorter->([EMAIL PROTECTED]); print "Raw sort results\n"; foreach (@{$sorted_array}){ print "$_\n"; } ------------------------------------------------------------------------------------------------------------- So what's the problem? The following sort which is taken directly from the documentation does NOT work: my $sorter = &Sort::Maker::make_sorter(qw(ref_in ref_out), qw(ST), number => [ qw(descending unsigned_float), code => '/(\d+)/', ], ) or die "Can't make sorter [EMAIL PROTECTED]"; And produces the following error: Can't make sorter make_sorter: Unknown attribute '/(\d+)/' Would like to get this second sort to work, because I want to sort on the entire float number not just the integer: '/(\d+\.\d+)/' Thank you, John Kent Webmaster NRL Monterey, http://www.nrlmry.navy.mil -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>