Next | Program Repair Shop | 71 |
21 die "You have not defined the \$source_directory variable, sorry...\n" if -d $source_directory !=1;
Testing a boolean value against 0 or 1
-d returns a true or false value already; the code should be:
die "You have not defined the \$source_directory variable, sorry...\n" unless -d $source_directory;
This also reads better
Next | Copyright © 2002 M. J. Dominus |