I think increment of $pic is not happening with this method
my $pic = 1; my $key_MS = "R3R3_${pic}_IF"; my $temp = 90; for (my $ip = 1; $ip<=100; $ip++) { if ($temp == $ip) { $pic++; } } print "New pic value is $key_MS\n"; output:New pic value is R3R3_1_IF
In reply to Re^2: variable inside hash key
by Anonymous Monk
in thread variable inside hash key
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |