On 02/25/2008 04:32:42 AM, Anirban Adhikary wrote:
-> Dear List
->
-> I need to delete each element after every execution of the foreach
-> loop and
-> I need to update & sorted the @arr1 after every execution of the
-> foreach
-> loop. I have tried a lot but not able to do this ............Pls
-> help...........
You cannot mean what you just said, which is a big reason for it not to
work. If you use the elements of an array and then expect redefining
the array will continually mean something in a loop this makes no sense.
I did not carefully peruse your code but i think what you REALLY want
is some form of nested loop:
$somecount = 0;
$somereason = 10;
until ($somecount > 10) {
foreach $e (@array) {
delete $file{$el};
}
$somereason++;
NOW REDEFINE @array;
}
Also you should understand "push" "shift" "unshift" "pop" because
either i miss the point (very possible) or your relating of arrays and
hashes does.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/