#!/usr/bin/perl
use strict;
use warnings;
my $num = unlink <*.bak>;
print "$num file(s) deleted.\n";
#varible and array does not delete
my $a = 10;
unlink $a;
print "$a\n";
my @goners = (1, 2, 3, 4, 5, 6);
unlink "@goners"; #unlink array is not possible
print "@goners\n";
unlink <*.bak> #unlink files
No comments:
Post a Comment