On Tue, 03 Nov 2009 17:23:38 +1000, Thomas Bätzler <t.baetz...@bringe.com>
wrote:
Majian <jian...@gmail.com> asked:
[...]
print "Array of random: $array[rand @array]\n";
I thoght it might work but it doesnt. I hope someone could give me an
idea to work this out...
TIMTOWTDY:
a) print "Array of random: $array[rand( @array ) ] \n";
b) print "Array of random: " . $array[rand @array] . "\n";
c) my $random_name = $array[rand @array];
print "Array of random: $random_name\n";
HTH,
Thomas
Hi Thomas,
Just a quick question, how does Perl interpret something like
$array[0.7995038473872]?
Cheers,
Dave
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/