use vars qw(@ISA @EXPORT $VERSION);
@ISA = qw(Exporter);
@EXPORT = qw(cp rm_f rm_rf mv cat eqtime mkpath touch test_f);
-$VERSION = '1.03_01';
+$VERSION = '1.04';
my $Is_VMS = $^O eq 'VMS';
expand_wildcards();
foreach (@ARGV)
{
- next unless -f $_;
+ next unless -f $_;
next if unlink($_);
- chmod(0777,$_);
+ chmod(0777,$_);
next if unlink($_);
carp "Cannot delete $_:$!";
}
expand_wildcards();
while (@ARGV)
{
- my $file = shift(@ARGV);
+ my $file = shift(@ARGV);
open(FILE,">>$file") || die "Cannot write $file:$!";
close(FILE);
utime($t,$t,$file);
croak("Too many arguments") if (@ARGV > 1 && ! -d $dst);
while (@ARGV)
{
- my $src = shift(@ARGV);
+ my $src = shift(@ARGV);
move($src,$dst);
}
}
Copies source to destination.
Multiple sources are allowed if destination is an existing directory.
-=cut
+=cut
sub cp
{
croak("Too many arguments") if (@ARGV > 1 && ! -d $dst);
while (@ARGV)
{
- my $src = shift(@ARGV);
+ my $src = shift(@ARGV);
copy($src,$dst);
}
}