Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Creating a file in temp folder

by twotone (Beadle)
on Apr 14, 2011 at 01:41 UTC ( #899318=note: print w/replies, xml ) Need Help??


in reply to Creating a file in temp folder

When I run into a problem with code that writes to a file, I like to test it writing into the same directory the perl is being run from to make sure it's not a file path issue. i.e.:

open($CONFLICTS, '+>', "data.txt") or die $!; print $CONFLICTS "@data";

Then it's easy to check in the same folder your perl code resides to see if it wrote the file.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://899318]
help
Chatterbox?
[stevieb]: one of my long-running Perl procs crashes with a segfault (because it wraps C code) is crashing after an hour or so... seeing if wrapping the cli call with valgrind will produce something useful

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2017-04-29 03:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (531 votes). Check out past polls.