On Thu, 16 Sep 2004, Jenda Krynicky wrote: > From: Chris Devers <[EMAIL PROTECTED]> > > On Thu, 16 Sep 2004, Anish Kumar K. wrote: > > > $filename = "data_logfile" .(localtime). ".txt"; > > > open(LOG, ">>$filename") || die "cannot append: $!"; > > > > > > > > > when I compile the file it says "Invalid argument". This is because > > > of the colon character. > > > > It is? Why? That colon looks pretty innocent to me, > > It doesn't to Windows. Filenames in Windows cannot contain any of > those: > \ / : * ? " < > |
I see. My confusion is that the only colon I picked out was at the end of the die "cannot append: $!" And the colon after "append" looked okay to me (and still does). I wasn't thinking of the colon that the localtime statement would make. -- Chris Devers -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>