Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Just before subroutine returns

by TheDamian (Vicar)
on Aug 29, 2017 at 14:08 UTC ( [id://1198269]=note: print w/replies, xml ) Need Help??


in reply to Just before subroutine returns

Another possibility would be the Scope::Upper module:
use Scope::Upper 'reap'; foo(4); foo(6); sub foo { my ($n) = @_; reap { print "\$n = >$n<\n" }; # <-- Exec block when sub exits return 1 if $n < 5; $n *= 52; return $n; }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1198269]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-03-29 06:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found