Hi,
My script has 3 options which recieve integers. If any of those
options are having a value which is less than zero i want to make them
to 100.
eg: if opt2 = 32 and opt3 = 24 i want to make them to 100.
code
=====
our $opt1,$opt2,$opt3;
our @opt = (\$opt1,\$opt2,\$opt3);
GetOptions('opt1=i' => \$opt1,
'opt2=i' => \$opt2,
'opt3=i' => \$opt3)
check();
sub check
{
foreach (@opt)
{
# error here : The change does not get reflected on the actual
options.
if ($$_ < 100)
{
$$_ = 100;
}
}
}
Pls help me..
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/