in reply to Re^3: Use text string as stdin for system process
in thread Use text string as stdin for system process

The b***ards are going to check the source.
  • Comment on Re^4: Use text string as stdin for system process

Replies are listed 'Best First'.
Re^5: Use text string as stdin for system process
by quester (Vicar) on Jan 05, 2007 at 23:14 UTC
    Actually, you can do exactly the same thing in Perl, although it's considered stylistically sucky and is a hazard to security if there are variables that mischievous users can set to evil values.
    $x=`cat <<endl | grep whatever yadda yadda whatever yadda yadda endl`; chomp $x; print qq{\$x="$x"\n};
    prints
    $x="whatever"