in reply to Problem using Backtick having quotes

Because the %ENV hash is not propagated to the shell that the perl backticks spawns off.. Can you just have perl call the ksh script instead?

Update: doh. i confused myself with a bad test: perl -le '$ENV{foo}="asd"; print `echo b $foo a`' (needs to be \$foo)

Maybe it's due to the behavior of the qx// operator? What about doing this instead?
my $cmd = sprintf 'java ETicket.ETicketClient -i Ticket -n p_name -t +"%s"', $test; my $result = `$cmd`; print $result;

Replies are listed 'Best First'.
Re^2: Problem using Backtick having quotes
by runrig (Abbot) on Oct 18, 2005 at 18:39 UTC
    Because the %ENV hash is not propagated to the shell..
    This works fine for me:
    #!/usr/bin/perl $ENV{foobar} = "baz"; my $res = `echo \$foobar`; print $res; #prints 'baz'