Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: removing the goto

by TilRMan (Friar)
on Jun 03, 2007 at 06:05 UTC ( #618960=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @weighteddiv = (('1234') x 7, ('9876') x 42, ('1123') x 13);
    my %selected;
    ...
    
    my @selected = keys %selected;
    print "Selected: @selected\n";
    
  2. or download this
      if (++$selected{$pluck} == 1) {
        push @selected, $pluck;
      }
    
  3. or download this
    my @weighteddiv = (('1234') x 7, ('9876') x 42, ('1123') x 13);
    my @selected;
    ...
    }
    
    print "Selected: @selected\n";
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://618960]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2017-09-21 21:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (253 votes). Check out past polls.

    Notices?