in reply to Re: call another program from perl
in thread call another program from perl

Actually putting the program name in a variable is an excellent step for several reasons:

Especially if the location is likely to vary from machine-to-machine (or user-to-user) you might want to go even a step further by defining the default location as a constant (or Readonly value if you like) and initializing the path using that constant but allowing it to be overridden via Getopt::Long option or the environment.

Yeah the rest of the OP's code has problems, but this complaint's specious.

The cake is a lie.
The cake is a lie.
The cake is a lie.

Replies are listed 'Best First'.
Re^3: call another program from perl
by oko1 (Deacon) on Jul 18, 2008 at 12:52 UTC

    Your corrections would be true if this was a program of any length. As it stands, you're picking nits. This is like insisting that a one-liner consisting of 'print "Hello, world"' must enable strictures, include a test suite, and be fully documented.

    
    -- 
    Human history becomes more and more a race between education and catastrophe. -- HG Wells