in reply to Re: Sorting issue
in thread Sorting issue

(2-arg open, because I can never remember whether I need "|-" or "-|" for 3-arg open; using 2-arg open beats looking it up in the manual).

Just imagine the - being replaced by the program name. So |- is like |consumer (and you can write to the file handle in your Perl code), and -| is like producer| (and you can read from the file handle in your Perl code).

Replies are listed 'Best First'.
Re^3: Sorting issue
by JavaFan (Canon) on Nov 04, 2011 at 23:52 UTC
    Yeah, and that's so very confusing. See, for me, '-' just screams STANDARD (IN|OUT)PUT. So, '|-' just looks like I get to read from the programs standard output, and '-|' means I get to write to the programs standard input. Which is just the other way around of what it really is. :-/
      ++ I'm with you on that. '-' has been ingrained as STANDARD into my Unix subconscious.