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=perl>
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;
}
}
}
<icode>
Pls help me...