From: "Mauricio Fernández" Date: 2003-06-12T14:35:46+09:00 Subject: Re: Ruby advantages over Perl On Thu, Jun 12, 2003 at 11:06:55AM +0900, Michael Campbell wrote: > > 3) any type of object can be used as a key in a Ruby hash (Perl can > > only use strings as keys). > > I don't think this is accurate. This works perfectly fine in perl: > > $hash{1.0} = "foo"; > keys %hash # => "1" or 1, depending on context. That because Perl mixes strings and numbers, isn't it? But is the following possible? item = Object.new # replace by something meaningful prices[item] = 20 -- _ _ | |__ __ _| |_ ___ _ __ ___ __ _ _ __ | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ | |_) | (_| | |_\__ \ | | | | | (_| | | | | |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_| Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com Never trust an operating system you don't have sources for. ;-) -- Unknown source