in reply to System tick and CURL not interrpeting variable

avoid the shell, use system with Capture::Tiny
#!/usr/bin/perl -- use strict; use warnings; use Capture::Tiny qw/ capture /; use Data::Dump qw/ dd /; my @cmd = ( 'python', '-V' ); my( $stdout, $stderr, $exit ) = capture { system { $cmd[0] } @cmd; };; dd({ stdout => $stdout, stderr => $stderr, exit => $exit } ); __END__ { exit => 0, stderr => "Python 2.5\n", stdout => "" }

Replies are listed 'Best First'.
Re^2: System tick and CURL not interrpeting variable
by afoken (Chancellor) on Dec 12, 2015 at 20:02 UTC
    avoid the shell, use system with Capture::Tiny

    Avoid the shell AND curl, use one of perl's HTTP libraries like LWP, or, in this case, use a SOAP library.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)