hilbert has asked for the wisdom of the Perl Monks concerning the following question:
I would like to erase all the files in the directory a/b but those with a .zip suffix.
Since:
unlink glob('a/b/*.zip');does deletes all the files with .zip suffix, I though that:
unlink glob('a/b/!(*.zip)');could erase all the files but those with .zip suffix.
But it does not work: it deltes no files.
Any suggestion please?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Beginner question about files deletion
by Corion (Patriarch) on Feb 07, 2012 at 11:24 UTC | |
|
Re: Beginner question about files deletion
by JavaFan (Canon) on Feb 07, 2012 at 12:40 UTC | |
|
Re: Beginner question about files deletion
by choroba (Cardinal) on Feb 07, 2012 at 11:45 UTC |