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

Re^3: Wrong idioms (open $fh, '<', undef)

by BrowserUk (Pope)
on Mar 30, 2013 at 01:57 UTC ( #1026222=note: print w/replies, xml ) Need Help??


in reply to Re^2: Wrong idioms (open $fh, '<', undef)
in thread Wrong idioms

the problem with that is undef opens a temporary file

And what is to say that is not both a useful feature and exactly what the user intends?


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
  • Comment on Re^3: Wrong idioms (open $fh, '<', undef)

Replies are listed 'Best First'.
Re^4: Wrong idioms (open $fh, '<', undef)
by Anonymous Monk on Mar 30, 2013 at 02:39 UTC

    And what is to say that is not both a useful feature and exactly what the user intends?

    Hmm, open a file for reading, not append, can't read from it, can't write to it -- makes perfect sense, very useful

      Hmm, open a file for reading, not append, can't read from it, can't write to it -- makes perfect sense, very useful

      If it is a non-useful behaviour, then it is open that is at fault and should be fixed.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

        If it is a non-useful behaviour, then it is open that is at fault and should be fixed.

        clownshoes

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1026222]
help
Chatterbox?
[davido]: I am not finding closing STDIN to be an adequate means of making getlogin return undef.
[Corion]: Maybe doing a double-fork (daemonizing) can make go that information away, but maybe not
[Corion]: But I think my knowledge of unix/Linux datastructures is several decades out of date, so I don't really know what information it keeps on processes
[oiskuu]: The useful bits that relate to your process can be found under /proc/self. What information are you thinking of? Tty name?
[tye]: I just daemonized and getlogin() still knew who I had been.

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2017-06-23 19:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (554 votes). Check out past polls.