Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^3: variable scope within eval{}

by AnomalousMonk (Archbishop)
on Jan 29, 2010 at 23:18 UTC ( #820422=note: print w/replies, xml ) Need Help??


in reply to Re^2: variable scope within eval{}
in thread variable scope within eval{}

Easy enough to prove it works:

>perl -wMstrict -le "my $bl_id; my @bly_id; sub insert_budget_line { return 'foo'; } sub insert_budget_line_year { return @_[1,0]; } eval { $bl_id = insert_budget_line(); @bly_id = insert_budget_line_year(bl_id => $bl_id); }; print qq{@bly_id}; " foo bl_id

How is your  insert_budget_line_year function defined?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (2)
As of 2023-02-07 04:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (38 votes). Check out past polls.

    Notices?