|Pathologically Eclectic Rubbish Lister|
Re: Eval and $@% ...by jeroenes (Priest)
|on Jun 19, 2001 at 01:44 UTC||Need Help??|
The eval solution is nice. But I don't see where you get the $type from.
Well, if you have a CODE (it's actually a sort of ref) and the functions are garanteed to neglect the input, you could use CODE => '&'.
To handle REFs, add:
$type = ref( $_ ) if $type eq 'REF';
A GLOB is more problematic. You have to put it into brackets so add an extra if statement:
Hope this helps,