in reply to Saving/recovering sub refs in a file
Gives:#!/usr/bin/perl use strict; use warnings; use B::Deparse; sub myfunc { print "Hello @_\n"; return 42 } my $tricky = \&myfunc; my $deparse = B::Deparse->new(); my $body = $deparse->coderef2text($tricky); print "$body\n";
{ use warnings; use strict 'refs'; print "Hello @_\n"; return 42; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Saving/recovering sub refs in a file
by madscientist (Novice) on Jun 16, 2010 at 15:29 UTC | |
by Khen1950fx (Canon) on Jun 16, 2010 at 23:18 UTC |