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

Re: creating a file using a variable name

by azatoth (Curate)
on Jun 25, 2001 at 20:13 UTC ( #91327=note: print w/ replies, xml ) Need Help??


in reply to creating a file using a variable name

First, do you have adequate permissions to create files in the directory?

Second, this should work :

my $file = "Timestamp.txt"; open (FH, ">$file") or die "Could not create file : $!\n";

If it doesn't, the die function will tell you why it didn't work...

Azatoth a.k.a Captain Whiplash

Make Your Die Messages Full of Wisdom!
Get YOUR PerlMonks Stagename here!
Want to speak like a Londoner?


Comment on Re: creating a file using a variable name
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (15)
As of 2015-07-31 20:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (281 votes), past polls