Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 one hand claps...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2017-11-23 06:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (328 votes). Check out past polls.

    Notices?