>>>>> "Paul" == Paul  <[EMAIL PROTECTED]> writes:

Paul> This is lovely, and a great opportunity to show some new toys to
Paul> beginners, as well as some well-placed caveats. With your indulgence,
Paul> I'll try to break this down for the newbies. :)

Great!

Paul> Be careful with this, though -- if you call some other function
Paul> from this scope, the value of $SIG{__WARN__} will still be the
Paul> routine that increments $bad, but it won't be able to see the
Paul> $bad we made with my()!

Wrong.  It'll still work!  It's a closure!

(now explain that... :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

Reply via email to