On Mon, Mar 28, 2011 at 11:10, Katya Gorodinsky <katya.gorodin...@ecitele.com> wrote: > Maybe this way: > > @bet1 = (0,0,0,0); > @bet2 = (0,0,0,1); > @bet3 = (0,0,1,0); > > $random_bet_position = int(rand(3) + 1); > > $name = 'bet' . $random_bet_position; > @selected_bet = @{$name};
Symbolic references are incredibly dangerous and mostly unnecessary in Modern Perl. This is why the [strict pragma][0] bans their use. The proper solution is to use the correct data structure (in this case an array of arrays). [0]: http://perldoc.perl.org/strict.html -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/