Took the original code from AS Doc: $Data::Dumper::Sortkeys = \&my_filter; my $foo = { map { (ord, "$_$_$_") } 'I'..'Q' }; my $bar = { %$foo }; my $baz = { reverse %$foo }; print Dumper [ $foo, $bar, $baz ]; sub my_filter { my ($hash) = @_; # return an array ref containing the hash keys to dump # in the order that you want them to be dumped return [ # Sort the keys of %$foo in reverse numeric order $hash eq $foo ? (sort {$b <=> $a} keys %$hash) : # Only dump the odd number keys of %$bar $hash eq $bar ? (grep {$_ % 2} keys %$hash) : # Sort keys in default order for all other hashes (sort keys %$hash) ]; }
Where I changed the my_filter to: sub my_filter { my ($hash) = @_; # return an array ref containing the hash keys to dump # in the order that you want them to be dumped return [ sort {$a <=> $b} keys %$hash ]; } # end of my_filter Higher in the code I have the following: $Data::Dumper::Indent = 1; $Data::Dumper::Sortkeys = \&my_filter; The call is like: $Data::Dumper::Varname = q[MyDSNPDS_]; print MYHARDCOPY Dumper( \%{$MyDSNPDS} ); I am using strict and warnings and get nothing outputted. There should be a little over 10k rcds printed ( but was not printing the way I wanted, so was trying this) and now get nothing. running as 5.8.3 under XP Service pack 2 Any questions and/or problems, please let me know. Thanks! Wags ;) WGO: x2224 ******************************************************* This message contains information that is confidential and proprietary to FedEx Freight or its affiliates. It is intended only for the recipient named and for the express purpose(s) described therein. Any other use is prohibited. ******************************************************* -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>