Problems running perl programe through R using system command
===

when I run my perl programme using system I get the following error.

    > system("perl txt2xlsx.pl", intern=TRUE, wait=TRUE)
    character(0)
    attr(,"status")
    [1] 2
    Warning message:
    running command 'perl txt2xlsx.pl' had status 2 

However, when I run the script from terminal/console it works perfectly fine.
For testing purposes I put another perl script that just prints "Output" to the screen into the same directory and ran it with:

    > system("perl test.pl",     intern=TRUE, wait=TRUE)
   [1] "Output"

Works fine.

When you run my txt2xlsx.pl script without any arguments it prints:

    Usage: txt2xlsx.pl <directory> <output file>

Can anyone imagine why R returns this error? It worked fine until I updated to the newest perl version:

    This is perl 5, version 12, subversion 4 (v5.12.4) built for darwin-multi-2level

Cheers
