Re: code help



jammer <jameslockie@xxxxxxxx> wrote:
Why does this give a syntax error?


# not 2 arguments, print usage
if ($#ARGV != 1) {
print "\nusage: " . $ARGV[0] . "\[backupDir\] \
[backupConfigFile\]\n";
}

It doesn't for me:

C:\tmp>type t.pl
# not 2 arguments, print usage
if ($#ARGV != 1) {
print "\nusage: " . $ARGV[0] . "\[backupDir\] \
[backupConfigFile\]\n";
}

C:\tmp>perl -c t.pl
t.pl syntax OK

jue
.