Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Getting the Behavior of the "file open or die" Pragma but with a Program Pause

by stevieb (Canon)
on Oct 10, 2016 at 16:02 UTC ( [id://1173663]=note: print w/replies, xml ) Need Help??


in reply to Getting the Behavior of the "file open or die" Pragma but with a Program Pause

If you don't like having to have the user take action, you could always just do something like sleep 5;. That'll display the error for five seconds, then exit.

  • Comment on Re: Getting the Behavior of the "file open or die" Pragma but with a Program Pause
  • Download Code

Replies are listed 'Best First'.
Re^2: Getting the Behavior of the "file open or die" Pragma but with a Program Pause
by perldigious (Priest) on Oct 10, 2016 at 16:19 UTC

    I don't mind the user interaction, in fact I prefer it because it all but forces them to look at the error message. My main cringe is that I took something as clean and tidy as the one line "open or die" and use this kludge just to get the program pause behavior. I'm picking nits I'm sure, but I was hoping there was a way to keep that one line cleanliness (with the post-fix notation), get the pause, and not have to resort to a subroutine call as I do. I'm probably asking to have my cake and eat it too. :-)

    I love it when things get difficult; after all, difficult pays the mortgage. - Dr. Keith Whites
    I hate it when things get difficult, so I'll just sell my house and rent cheap instead. - perldigious

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-20 10:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found