in reply to Re^4: redirect output from a command to another command
in thread redirect output from a command to another command

I lose portability

You'd gain portability.

  • Comment on Re^5: redirect output from a command to another command

Replies are listed 'Best First'.
Re^6: redirect output from a command to another command
by Allasso (Monk) on Mar 02, 2011 at 21:31 UTC
    ????

    I thought I would have to depend on the machine the script is being run on having the module I need.

      That's not portability. Ease of installation, maybe? Portability is a measure of the ability to run on different platforms. The /dev/fd solution is not portable, whereas Algorithm::Diff will run on any platform that can run Perl.

      Just install Algorithm::Diff as part of the process of installing the script. If you use a standard installer, it's just a question of adding one line to Makefile.PL/Build.PL.