in reply to Re: Directory Structure.
in thread Directory Structure.
When doing this, keep in mind that using backticks (``) or the qx// quote-like operator, the command provided is passed through the shell (/bin/sh, whatever THAT really is) and subject to all the usual shell magic. This may be a problem if you're not expecting it, and a security issue if you're passing user input to the shell.
In order to avoid the shell, use system instead and pass a list:
#!/usr/bin/perl # ... system ("mkdir", "-p", map { "$dir/$_" } @files);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Directory Structure.
by shmem (Chancellor) on Apr 01, 2017 at 10:13 UTC | |
by AppleFritter (Vicar) on Apr 01, 2017 at 10:22 UTC | |
by shmem (Chancellor) on Apr 01, 2017 at 10:43 UTC |
In Section
Seekers of Perl Wisdom