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.
In reply to Re^2: call another program from perl
by Fletch
in thread call another program from perl
by lil_v
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |