SitAllDay has asked for the wisdom of the Perl Monks concerning the following question:
Hi guys I am new to Perl. Recently I received a task to find a file using system(file...), however the output keeps displaying File Not Found...
use strict; use warnings; my $destination = 'C:\Users\Documents'; if (-d ${destination}) { print "Info: Detected folder exists. \n"; } else { print "Folder not found!\n"; } print "Unzip destination folder\n"; system("find $destination -name '*.txt'");
And here is what shown in my terminal:
C:\Users\Documents>perl test3.pl
Info: Detected folder exists.
Unzip destination folder
File not found - '*.txt'
Hopefully someone can help me with this. Thanks a lot!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: system(find) unable to find a file even if the file exists
by BrowserUk (Patriarch) on Feb 14, 2018 at 09:22 UTC | |
|
Re: system(find) unable to find a file even if the file exists
by ikegami (Patriarch) on Feb 14, 2018 at 09:51 UTC | |
|
Re: system(find) unable to find a file even if the file exists
by 1nickt (Canon) on Feb 14, 2018 at 14:06 UTC | |
|
Re: system(find) unable to find a file even if the file exists
by choroba (Cardinal) on Feb 14, 2018 at 09:03 UTC | |
|
Re: system(find) unable to find a file even if the file exists
by Anonymous Monk on Feb 14, 2018 at 09:04 UTC |