i need to be able to create a file everyday that will have a naming convention so that it will be a timestamp.txt for example 25-may-2001 14:45:34.txt

i've used the following code:

$filename = $timestamp.".txt"; print $filename; sleep 5; open (TEMPFILE, ">$filename");

i used the print and sleep to ensure that $filename was indeed the correct name and it is. the only problem is that the file is not created. i am operating on win2000 and have adminstrator rights. HELP PLEASE

thanks again for your prompt responses!! perlmonks rule!!

Edited by footpad, 26 Jun 2001 - 09:19 am (PDT)


In reply to still can't create a file using a variable by pigeonjp

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.