> -----Original Message----- > From: Adriano Allora [mailto:[EMAIL PROTECTED] > Sent: Thursday, December 28, 2006 3:24 AM > To: beginners@perl.org > Subject: 1, random; 2, unicode > > hi to all, > > two questions: > > 1) I need to extract a random item from an hash, does exist a > function > to do it? A module? An implementable and not-too-much-slow flowchart? Asssume you have a hash %h with some items, the following lien get a random item:
use List::Util qw(shuffle); print $h{shuffle keys %h}; > > 2) How to use unicode with perl? If I write "cos'รจ" in a string and > then I print in the stdout that sring, I read "cos'?" > Is this a problem of my terminal/operative system (OSX)? Excuse me if > this question is OT. See "perldoc unicide" for detail. [snipped] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>