Hi

> Perhaps $touchcmd and $chkstat could be done in perl instead of running 
> them in an external process?  What exactly do $touchcmd and $chkstat do?

$chkstat="cat tmp";

The source looks to me that you only want to see if the file is created or not?
you can simply call open(); to check this for you, but stat() would be better, 
i think.


$touchcmd="touch test"; 
for touch you can use
http://search.cpan.org/~nwetters/File-Touch-0.02/Touch.pm

If you dont have File::Touch installed, the main thing is
sysopen my $fh,$file,O_WRONLY|O_CREAT|O_NONBLOCK|O_NOCTTY or
croak("Can't create $file : $!");
close $fh or croak("Can't close
$file : $!");

if your sysopen() works, your file is surely created.

I think that would make the hole thing faster and easier.,

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to