expand_wildcards();
foreach (@ARGV)
{
- next unless -f $_;
+ next unless -f $_;
next if unlink($_);
- chmod(0777,$_);
+ chmod(0777,$_);
next if unlink($_);
carp "Cannot delete $_:$!";
}
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);
}
}