Something I ran into while toying with Merijn's idea of freezing time (as presented on the last NL Perl Mongers meeting). $ perl -le 'print scalar localtime( () )' Thu Jan 1 01:00:00 1970 $ perl -le 'print scalar gmtime( () )' Thu Jan 1 00:00:00 1970 Note the extra () specified. Similarly: $ perl -le '$_ = []; print ref( )' ARRAY $ perl -le '$_ = []; print ref( () )' If this is intended behaviour, I wonder how you can destinguish between no parameters specified, and an empty list specification from within a called subroutine? $ perl -wle 'sub a { print scalar @_ } a'; 0 $ perl -wle 'sub a { print scalar @_ } a()'; 0 $ perl -wle 'sub a { print scalar @_ } a( () )'; 0 Checking @_ clearly doesn't help. Checking caller() neither: $ perl -wle 'sub a { print +(caller(0))[4] } &a'; 0 $ perl -wle 'sub a { print +(caller(0))[4] } a'; 1 $ perl -wle 'sub a { print +(caller(0))[4] } a()'; 1 $ perl -wle 'sub a { print +(caller(0))[4] } a( () )'; 1 The reason I'm asking, is that I want to be able to completely mimic the behaviour of builtins when they're wrapped by custom code: it would seem to me that that is basically impossible at the moment. Or am I missing something? LizThread Next