Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^6: STDERR Restore after redirect (updated)

by tultalk (Monk)
on Apr 28, 2018 at 20:31 UTC ( [id://1213742]=note: print w/replies, xml ) Need Help??


in reply to Re^5: STDERR Restore after redirect (updated)
in thread STDERR Restore after redirect

And what to make of this?

When to Use my and When to Use local Always use my; never use local.

  • Comment on Re^6: STDERR Restore after redirect (updated)

Replies are listed 'Best First'.
Re^7: STDERR Restore after redirect (updated)
by AnomalousMonk (Archbishop) on Apr 28, 2018 at 21:53 UTC
    Always use my; never use local.

    Personally, I always choose lexicals over package-global variables if I have a choice. But if you're working with STDOUT and STDERR, then that's what you've got to work with, and local is the right tool. (And don't blame the poor, innocent  SEND: { ... } block if you've got code somewhere that's stepping on your global file handles. :)


    Give a man a fish:  <%-{-{-{-<

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1213742]
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 2026-01-15 09:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (118 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.