system
1
Hello,
I have an array in which output of a query is stored. These values can be accessed by,
foreach my $val (@result){
print ("\nValue : @{$val}[1] from result");}
Can anybody please explain me, how to delete any particular element in array @result ?
zaxxon
2
I am not a Perl specialist, but entering "perl delete array element" into Google got me nearly 3.000.000 hits.
From http://www.tizag.com/perlT/perlarrays.php:
system
3
Yup, thats Ok but what I wanted is how we can remove whole array within array....
Instead of removing each element, you can 'clean up' the array by re-assignation
my @array1;
$array1[1]=11;
print "before: $#array1\n";
my @array2;
@array1=@array2;
print "after: $#array1\n";
system
5
If am using
delete$array[index]
here then it shows blank element in between array. it does not shift next element one level up...