- or download this
sub foo {
my ( $arg ) = @_ ;
...
print "foo1: $foo1\n" ;
print "foo2: $foo2\n" ;
- or download this
ARG[123]
ARG[456]
foo1: RE[123]
foo2: RE[456]
- or download this
my $e = 10 ;
my $sub = eval(" sub { return 2**$e } ") ;
- or download this
sub foo { print "foo\n" ;}
# now redefining it:
*foo = sub { print "bar\n" ;}