http://qs321.pair.com?node_id=75603


in reply to Pipe Question

On my Unix system, scripts are not executable from the current directory without preappending "./" to the filename.

Your scripts works fine when I replace your open statement with:

open (P, "| ./from.pl");

Replies are listed 'Best First'.
Re: Re: Pipe Question
by sachmet (Scribe) on Apr 26, 2001 at 00:26 UTC
    It shouldn't, unless you're writing to P. See my response below.

    What you're probably seeing is from.pl writing to stdout, and you're not getting a count of 4 underneath the words.
      You're correct about the placement of the pipe (and not getting a count without its correct placement).

      But on my system this works:

      open (P, "./from.pl |");

      and this does not work:

      open (P, "from.pl |");

      From the shell I must always specify a script's path, unless the path is defined in PATH.