Re: Pop a Hash?

2005-02-13 Thread David Storrs
On Fri, Feb 11, 2005 at 05:33:29PM -0800, Ashley Winters wrote: On Thu, 10 Feb 2005 08:59:04 -0800, David Storrs [EMAIL PROTECTED] wrote: On Wed, Feb 09, 2005 at 05:13:56AM -0600, Rod Adams wrote: ($k, $v) == pop %hash; make sense to anyone except me? ... the only time it's useful

Re: Pop a Hash?

2005-02-11 Thread Ashley Winters
On Thu, 10 Feb 2005 08:59:04 -0800, David Storrs [EMAIL PROTECTED] wrote: On Wed, Feb 09, 2005 at 05:13:56AM -0600, Rod Adams wrote: Does ($k, $v) == pop %hash; or ($k, $v) == %hash.pop; make sense to anyone except me? ... the only time it's useful is if you want to process

Pop a Hash?

2005-02-09 Thread Rod Adams
Does ($k, $v) == pop %hash; or ($k, $v) == %hash.pop; make sense to anyone except me? Since we now have an explicit concept of pairs, one could consider a hash to be nothing but an unordered (but well indexed) list of pairs. So, C pop %hash would be a lot like C each , except, of course

Re: Pop a Hash?

2005-02-09 Thread Matthew Walton
Rod Adams wrote: Does ($k, $v) == pop %hash; or ($k, $v) == %hash.pop; make sense to anyone except me? Makes sense to me. Although I would be more inclined to think of pop as returning a pair - but does a pair in list context turn into a list of key, value? If so then the above makes lots

Re: Pop a Hash?

2005-02-09 Thread Eirik Berg Hanssen
Matthew Walton [EMAIL PROTECTED] writes: Rod Adams wrote: Does ($k, $v) == pop %hash; or ($k, $v) == %hash.pop; make sense to anyone except me? Makes sense to me. Although I would be more inclined to think of pop as returning a pair - but does a pair in list context turn into a list