in reply to Re^2: system command has problem with '>>'
in thread system command has problem with '>>'

Not true. The shell processes '>>', not 'ls', as can be seen from the pastes below.

Thats what I said.

Anyone else have any ideas on this?

Like I said, use IPC::System::Simple systemx, it process >> like the shell without invoking the shell, or like JavaFan said, invoke the shell

Replies are listed 'Best First'.
Re^4: system command has problem with '>>'
by ikegami (Patriarch) on Mar 30, 2010 at 02:50 UTC

    it process >> like the shell without invoking the shell

    No.

    $ dir foo ls: foo: No such file or directory $ perl -MIPC::System::Simple=systemx -e'systemx "ls", ">>", "foo"' ls: >>: No such file or directory ls: foo: No such file or directory "ls" unexpectedly returned exit value 2 at -e line 1 $ perl -MIPC::System::Simple=systemx -e'systemx "ls >> foo"' "ls >> foo" failed to start: "No such file or directory" at -e line 1 $ dir foo ls: foo: No such file or directory

    Same goes for 2>&1

    $ perl -MIPC::System::Simple=systemx -e'systemx "ls 2>&1"' "ls 2>&1" failed to start: "No such file or directory" at -e line 1 $ perl -MIPC::System::Simple=systemx -e'systemx "ls", "2>&1"' ls: 2>&1: No such file or directory "ls" unexpectedly returned exit value 2 at -e line 1

    It would defy the entire point of systemx if any argument was treated specially.