in reply to want to store the current value of the array ina variable inside for loop
Please post your actual Perl code, and
use warnings; use strict;
Preferably, a minimal example that illustrates the problem you are having. With things // comments, $box_1 vs $box1, it's hard to tell what your exact intent was, or which other errors may be masking the real problem.
how can i assign the current value of the array to a varible?so that i can insert it into mapping table
Given your code, my guess is that you want the last value (in this case, the last one pushed in the loop above) in @box1 to be assigned to $box_1. Is that correct? If so, you can do so like this:
my $box_1 = $box1[-1];
If that's not it, please clarify what you need, ideally with a concise example.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: want to store the current value of the array ina variable inside for loop
by gayu_justin (Novice) on Jul 06, 2013 at 12:20 UTC |