in reply to Avoiding global variables when I need to supply a callback
Read up on closures in perlsub and perlref.{ # in some scope my @array = ( qw(some data) ); my $finder = URI::Find->new(sub { # this callback code sees @array as it was when the closure wa +s created. }); }
|
|---|