H
hymie!
Greetings.
I've run across this issue:
#!/usr/bin/perl
use Getopt::Std;
getopt('l');
print "$opt_l\n";
eric@db01:~/last_update$ ./test.pl -l5
5
eric@db01:~/last_update$ ./test.pl -l larry
larry
eric@db01:~/last_update$ ./test.pl -l
eric@db01:~/last_update$
perldoc tells me:
For each
switch found, sets $opt_x (where x is the switch name) to
the value of the argument, or 1 if no argument.
However, that doesn't seem to be happening. $opt_l is not being set to
1 when there is no argument.
Is this my fault?
Thanks.
hymie! http://www.smart.net/~hymowitz hymie_@_lactose.homelinux.net
===============================================================================
He's neurotic, which is Jewish for "intense." --Cybill
===============================================================================
I've run across this issue:
#!/usr/bin/perl
use Getopt::Std;
getopt('l');
print "$opt_l\n";
eric@db01:~/last_update$ ./test.pl -l5
5
eric@db01:~/last_update$ ./test.pl -l larry
larry
eric@db01:~/last_update$ ./test.pl -l
eric@db01:~/last_update$
perldoc tells me:
For each
switch found, sets $opt_x (where x is the switch name) to
the value of the argument, or 1 if no argument.
However, that doesn't seem to be happening. $opt_l is not being set to
1 when there is no argument.
Is this my fault?
Thanks.
hymie! http://www.smart.net/~hymowitz hymie_@_lactose.homelinux.net
===============================================================================
He's neurotic, which is Jewish for "intense." --Cybill
===============================================================================