wisemonkey has asked for the wisdom of the Perl Monks concerning the following question:
examples of filenames are:#!/usr/bin/perl use warnings; use strict; use diagnostics; use File::Find; sub eachFile { my $filename = $_; my $fullpath = $File::Find::name; if (-e $filename) { print "$filename exists!\n"; } if ($filename =~ /index.html.*/){ print "$filename need to be deleted\n"; system "rm $filename"; } } find (\&eachFile, "./");
etc. Output of given code comes out to be:index.html index.html?C=D;O=D
I don't understand why its being so, I appreciate your suggestionsindex.html?C=S;O=D exists! index.html?C=S;O=D need to be deleted rm: cannot remove `index.html?C=S': No such file or directory
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: not parsing properly??
by toolic (Bishop) on Apr 17, 2011 at 23:37 UTC | |
by wisemonkey (Novice) on Apr 17, 2011 at 23:49 UTC | |
by wisemonkey (Novice) on Apr 18, 2011 at 01:07 UTC | |
|
Re: not parsing properly??
by ikegami (Patriarch) on Apr 17, 2011 at 23:32 UTC | |
|
Re: not parsing properly??
by anonymized user 468275 (Curate) on Apr 18, 2011 at 13:30 UTC |