in reply to Simple/Quick question about opening creating a file using perl

Another idea is:

create the directory with mkdir if it not exists.

then use LWP::Simple's getstore routine to store the content directly in your desired file.

That saves you the work of opening the file, printing to it and closing it again.

  • Comment on Re: Simple/Quick question about opening creating a file using perl

Replies are listed 'Best First'.
Re^2: Simple/Quick question about opening creating a file using perl
by jdlev (Scribe) on Dec 29, 2008 at 20:08 UTC
    Thanks for the help! I got it to work!

      I wonder, that your initial question is now untitled and empty.

      Did you remove that stuff? If so, please recover it, so it becomes clear what the answers are related to. Thanks.

      Just to expand on linuxer's reply: Deleting your original post is the on-line equivalent of offering to hold a chair for someone to sit in and then yanking it out from under them when they do.

      Again, please restore what you have deleted.