Domenico Discepola wrote:
> Hello. I'm trying to use the File::Touch module and I get the error below.
> I'm using Activestate 5.8.2. Build 808 on Windows XP. Any thoughts?
>
> TIA
>
> ##########
> #!perl
> use strict;
> use warnings;
> use diagnostics;
> use File::Touch;
>
> my $result = File::Touch::touch('a.txt');
>
> exit 0;
[snip error message]
If all you need is the default behavior, you can touch one or more files
with a one-liner:
perl -MExtUtils::Command -e touch FILE1 FILE2 ...
Because ExtUtils::Command::touch() takes input from @ARGV, you need to
do something like this to use in a script:
#!/usr/bin/perl -w
use strict;
use ExtUtils::Command();
my @files = qw[one two three];
touch( @files );
sub touch {
local @ARGV = @_;
ExtUtils::Command::touch();
}
__END__
ExtUtils::Command is a standard module.
HTH - keith
|