On Tue, 12 Jun 2001, [EMAIL PROTECTED]
<snip>
> Here is the latest statements that I tried.
>
> system 'touch', 'test0612a.shtml';
system() returns 0 on success, other value on failure. What did
you expect? If it fails to touch the file, is the path correct?
Don't you need the full path to the file?
> exec 'touch', 'test0612a.shtml';
exec() doesn't return. The program touch will simply replace the
process of your perl script.
But actually....
Perl provides a way to touch files without external program. You
need the function utime().
$now = time;
utime $now, $now, @files; # sets access and modification time
# don't forget to check $!
Resources:
* "How do I set a file's timestamp in perl?" in perlfaq5
(perldoc -q timestamp)
* perldoc -f utime
hth
s::a::n
--
http://www.trabas.com