Re: Hash Sorting Problem
- From: halfcountplus@xxxxxxxxxxxxx (Mk)
- Date: Mon, 25 Feb 2008 05:24:03 -0500
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.
.
- References:
- Re: Hash Sorting Problem
- From: Anirban Adhikary
- Re: Hash Sorting Problem
- Prev by Date: Re: Hash Sorting Problem
- Next by Date: Re: Hash Sorting Problem
- Previous by thread: Re: Hash Sorting Problem
- Next by thread: Re: Hash Sorting Problem
- Index(es):
Relevant Pages
|