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.
Cool DRY-inspired idiom (Score:1)
Thanks.
Re:Cool DRY-inspired idiom (Score:3, Insightful)
Thanks. I saw that in someone else's code and I realized that my has a return value: the variable that it's declaring. This is not exactly clear from the docs, though. Maybe I should submit a doc patch. Hmm.
Re:Cool DRY-inspired idiom (Score:2)
-Dom
Re:Cool DRY-inspired idiom (Score:3, Interesting)
Re:Cool DRY-inspired idiom (Score:3, Informative)
You can't do that because the variable doesn't come into scope until after the current statement finishes executing. Fortunately, that's an easy fix.
Re:Cool DRY-inspired idiom (Score:2)