On Wednesday December 31 2008 13:34, you wrote:
>On Wed, Dec 31, 2008 at 9:42 AM, Christoph Leser 
<[email protected]> wrote:
>> #!/usr/bin/perl
>> `cd /path-to-dir`:
>> `rm *`;
>
>You shouldn't be using backticks in a perl script.  Backtick simply
>starts a new process/subshell and runs whatever you have in the
>backticks.  If you're writing perl, use perl's syntax, and you won't
>have these issues.

Try the below instead of the subprocess commands. Verify that unlink 
command first though; i don't work with globs in perl much and might 
have munged the syntax.

    chdir "/path-to-dir";
    unlink <*>;
-- 
------------------------------------------------------------------------
Dan Ramaley                            Dial Center 118, Drake University
Network Programmer/Analyst             2407 Carpenter Ave
+1 515 271-4540                        Des Moines IA 50311 USA

Reply via email to