On 01/16/2012 12:12 AM, Jeff Peng wrote:
Consider the code below, though eval a string is considered bad way
generally.
eval string is bad generally? it is bad UNLESS you need it. and you
don't need it here. the OP's problem is also very poorly stated. are the
arrays related by name? if so,
δΊ 2012-1-16 1:18, Pradeep Patra ει:
It works and displays 1-12. But I need something different because i
dont know the value of "n" beforehand. So I decided to use a for loop.
I tried push but it did not work. I would appreciate any help to merge
multiple array elements preferably not using any l
Hi all,
I want to merge more than 2 arrays.
For example:
@array1 = (1,2,3);
@array2 = (4,5,6);
@array3 = (7,8,9);
@array4 = (10,11,12);
my @array;
@array = (@array1,@array2,@array3,@array4);
print "Array elements:@array";
It works and displays 1-12. But I need something different because
On 01/13/2012 07:25 PM, Parag Kalra wrote:
my $obj = FooBar->new;
$obj->{'new_key'} = 'some_value'
Now I am not sure if that is the correct way of inserting a new data
structure into an already bless reference
1. FooBar may or may not be implemented as a hashref.
2. It's not wise to muck wit