in reply to File Creation

A couple of thoughts:

If this is a quick and dirty then something like: system "touch $filename"; will do the trick - although make sure that you have the right filename.

More elegantly could be acheived with a locking module, as you suggest. You can install modules yourself even if you are not the site admin. Download it off CPAN and then start using perl Makefile.PL PREFIX=/home/me/my-perl and the put use lib "/home/me/my-perl/"; at the top of you script. This will get you script to check this directory as well as the standard ones for modules.

Also, I think you have a spare " in your open command...

--tidiness is the memory loss of environmental mnemonics

Replies are listed 'Best First'.
Re: Re: File Creation
by halley (Prior) on Jun 04, 2003 at 14:09 UTC

    Since the original poster said 'administrator', and since they didn't name an operating system, I'd caution against using system("touch ..."). The touch command is not commonly available on Windows platforms. (Sure, you could install one made for Windows, but you'd have to be the administrator...)

    --
    [ e d @ h a l l e y . c c ]

Re: Re: File Creation
by nimdokk (Vicar) on Jun 04, 2003 at 14:21 UTC
    Thanks, I prefer to avoid system calls like that though, personal preference really. I think the extra " was the result of a sloppy cut-n-paste :) Still checked the actual program to make sure it hadn't snuck in there as well.

    "Ex libris un peut de tout"