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

Re^2: Why can't I open a file for writing?

by tdilling (Initiate)
on Jan 12, 2018 at 21:46 UTC ( #1207170=note: print w/replies, xml ) Need Help??


in reply to Re: Why can't I open a file for writing?
in thread Why can't I open a file for writing?

Arrrgh! That fixed it. That's what happens when you stare at the same line of code for too long... LOL

  • Comment on Re^2: Why can't I open a file for writing?

Replies are listed 'Best First'.
Re^3: Why can't I open a file for writing?
by jwkrahn (Monsignor) on Jan 13, 2018 at 02:36 UTC

    If you use || instead of or then you need parentheses for the open function:

    open( NEWFILE, '>', "$dir/subdirectory/$outputfile" ) || die "Can't +open $dir/subdirectory/$output

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2018-08-17 23:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:









    Results (184 votes). Check out past polls.

    Notices?