Re: Using array of reference variables in perl

2010-08-05 Thread Jim Gibson
On 8/4/10 Wed Aug 4, 2010 9:09 AM, "Sooraj S" scribbled: > 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 >

Re: Using array of reference variables in perl

2010-08-05 Thread Chas. Owens
On Thu, Aug 5, 2010 at 01:16, Sooraj S wrote: > Thanks for your reply.. > > I have used all the standard headers. The only thing that am concerend > is that i want my array opt as an array of references. > @opt = (\$opt1,\$opt2,\$opt3); > > When i iterate through the array, if it finds my conditio

Re: Using array of reference variables in perl

2010-08-05 Thread Sooraj S
Thanks for your reply.. I have used all the standard headers. The only thing that am concerend is that i want my array opt as an array of references. @opt = (\$opt1,\$opt2,\$opt3); When i iterate through the array, if it finds my condition to be matched, it should set the value to 100, so that th

Re: Using array of reference variables in perl

2010-08-04 Thread Chas. Owens
On Wed, Aug 4, 2010 at 12:09, Sooraj S wrote: > 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,$op

Using array of reference variables in perl

2010-08-04 Thread Sooraj S
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'