in reply to Creating subroutines on the fly

It can be done with eval:
#! /usr/bin/perl -w my $a = 'sub { $name = shift; return substr($name, 0, 1); }'; my $b = eval $a ; print &$b("wiredrat");
However, i don't know if it can be done without eval-ing it into $b. Hope this help you.

2005-02-16 Janitored by Arunbear - added code tags, as per Monastery guidelines