in reply to Problems with sending value to system command

Never have an if statement modifier on the end of a statement containg a my declaration. It will do Strange Things related to old values hanging aroung from previous calls to the enclosing block. ie replace
my $x = .... if $y;
with
my $x; $x = .... if $y;

Dave.

Replies are listed 'Best First'.
Re^2: Problems with sending value to system command
by EchoAngel (Pilgrim) on Dec 06, 2004 at 22:02 UTC
    I found out that the reason it doesn't work is that I must not include the \! within the value when sending through Perl. However, on the command line, the \! must be included.