in reply to Re: Question about loops and breaking out of them properly (updated)
in thread Question about loops and breaking out of them properly
Another efficiency possibility would be to use a hash and exists (or treat it as a set where keys for members get set to 1). Precaffeine at the moment (so I believe this was the intent but not sure) but for what the op was trying setup a %valid_selections and then loop over the values passed setting $selected{$item} = 1 if exists $valid_selection{$item} then @selection = keys %selected.
The cake is a lie.
The cake is a lie.
The cake is a lie.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Question about loops and breaking out of them properly
by unmatched (Sexton) on Apr 19, 2025 at 09:54 UTC |