Tuesday, October 27, 2015

How to get Random value from Array in Perl


my @ran_array = ('manoj', 'rajesh', 'Yogesh', 'Sagar');
print "Array before random: @ran_array\n\n";

print "Random Array Value: $ran_array[rand @ran_array]\n";