I actually just tested it and the function call intRand(45) did get evaluated. Perl 5.8.3 build 809
-- Chris Mike Arms wrote: You are making the incorrect assumption that the function call intRand(45) will get evaluated inside of double quotes. This is not the case. You can do it in two steps: my $index = intRand(45); print " $class[$index]"; But you might prefer something like this: my $index = intRand( scalar @class ); print " $class[$index]"; This assumes that intRand( N ) returns an integer in the range 0 .. N-1 . The value "scalar @class" is the number of elements of the @class array. -- Mike Arms _______________________________________________ ActivePerl mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ ActivePerl mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
