NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
The proper way (Score:1)
Hardcoding considered suboptimal (for a range of reasons). You want this:
You have to remember to pass a reference to
$objectin either case, though. No getting around that in Perl.Therefore you would normally use a closure as per Dominic’s suggestion.
Reply to This