Peter I saw Jenda's note and I suggest the code needs simplification. > P.S. you can see where I comment out the ccyymmdd_now function. That > approach works, but is not what I'm shooting for. > > %date_formats = ( > # "ccyymmdd" => {now => \ccyymmdd_now()}, > "ccyymmdd" => {now => sub { a hash with a value that is an annon hash whose lone key is a points to an annon subroutine - whoa
Can we profit by starting with: #!/usr/bin/perl -w use strict; my %date_formats = ( ccyymmdd => sub { my @arr = localtime(); print 'Year ', 1900 + $arr[5] . ' Month '. sprintf("%02d",$arr[4] + 1) . ' Day ' . sprintf("%02d",$arr[3]); } ); & { $date_formats{ccyymmdd} }; Pardon the year month day labels, but I thought anything to make the example clearer. Why the hash with a value that is an annon hash whose lone key is a points to an annon subroutine? If that is really what you need, mind if I ask why? David -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]