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.
return(); (Score:1)
return()with no arguments (which is what you're doing) does the "right thing" in both scalar and list contexts. It returns either an empty list or undefined value.Thus you could also have written:
return;for the same effect. I'm sure you know this already, but from your commentary and style it did look like you were trying to explicitly return an empty list.
Re:return(); (Score:1)
For less trickery with subs and call stacks and line numbers, remember your old friend 'do'!
$ perl -le'print join " ", (1, do { warn 2; () }, 3)'
2 at -e line 1.
1 3
Reply to This
Parent