thanks for everyone .i will go for a try
i am try to get it to work in another approach. while still got the problem
for($i=0; $i<=10;$i++)
{
$i ==5 or next; #### $i ==100 or $i == 5
my $swithnew = "old";
printf " $i next\n";
printf "$i swithnew= $swithnew xxx\n";
}
if ($swithnew=null ) { printf "$i it is an old value. we need to splice the array with new value\n"; }
else { printf " $i it is an new value. we have to puch the new value to the array \n"; }
----------------------
when i set $i ==5
the script print out 11 it is an old value. we need to splice the array with new value
this is the result i am expected
while i set $i ==100
the script pint out "11 it is an new value. we have to puch the new value to the array " which is out of my expectatioin result. what i expected is " it is an new value. we have to puch the new value to the array "
what is wrong with the code?
Thank you in advance
i am try to get it to work in another approach. while still got the problem
for($i=0; $i<=10;$i++)
{
$i ==5 or next; #### $i ==100 or $i == 5
my $swithnew = "old";
printf " $i next\n";
printf "$i swithnew= $swithnew xxx\n";
}
if ($swithnew=null ) { printf "$i it is an old value. we need to splice the array with new value\n"; }
else { printf " $i it is an new value. we have to puch the new value to the array \n"; }
----------------------
when i set $i ==5
the script print out 11 it is an old value. we need to splice the array with new value
this is the result i am expected
while i set $i ==100
the script pint out "11 it is an new value. we have to puch the new value to the array " which is out of my expectatioin result. what i expected is " it is an new value. we have to puch the new value to the array "
what is wrong with the code?
Thank you in advance