Write a program that removes *~ and *.ico files from a directory hierarchy. (Hint: Use the File::Find module.)
What will be an ideal response?
$ cat file-cleanup.pl
use File::Find;
my @starting_points = @ARGV ? @ARGV : '.';
find( \&handle_file, @starting_points );
sub handle_file {
my $name = $File::Find::name;
if ( -f $name ) {
if ( $name =~ /~$/ || $name =~ /\.ico$/ ) {
unlink $name;
}
}
You might also like to view...
All of the Internet's domain names and corresponding IP addresses are stored on a system of computers called the _____.
A. Domain Name System B. Domain Name Server C. Domain Name Service D. Domain Name Database
Describe the mail access vulnerability.
What will be an ideal response?
User-defined styles can be superseded by external styles, which are the styles that a website author creates and places within a Cascading Style Sheets (CSS) file and links to the page.?
Answer the following statement true (T) or false (F)
Which of the following commands can be used in Windows XP to modify when the CHKDSK command runs?
a. SCANDSK b. IPCONFIG c. CONVERT d. CHKNTFS