in reply to How do I use the output of one perls script as the input of another on the commandline? like a pipeline

As others suggested, you need to take care of the following two things as
  1. $arg shift @ARGV;
    to
    $arg = shift @ARGV;
  2. You are confused about the stdin, and the command line input.
Another thing which i understand is, you wanted the output to be fed as command line argument instead of input. For that you can use the "xargs" command as
./one.pl "one" | xargs ./two.pl
which will give your expected output. Hope this helps.

Sathiyamoorthy
  • Comment on Re: How do I use the output of one perls script as the input of another on the commandline? like a pipeline
  • Download Code