Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: Re: Re: Re: Hash slices ?

by snax (Friar)
on Dec 01, 2000 at 21:24 UTC ( #44410=note: print w/replies, xml ) Need Help??

in reply to Re: Re: Re: Hash slices ?
in thread Hash slices ?

First, thanks for your comment.

Now, on to what I originally wrote, which may sound snippy -- it's not meant to be.

Right. Well. That's a bit cryptic, though, no?

Further, 2nd Ed of Programming Perl provides that the first line is "Same as" as well. I'm not here to nitpick about right or wrong, though. Perhaps a line in perldata someplace that says "hash slices are lists" would clear things up.

Honestly, I find this behavior a bit odd. With a list, evaluated in a scalar context so that it returns its last value, you could at least have things going on prior to the last value that are meaningful in determining the last value (much like constructs in C with the comma operator).

By the time you shove stuff into an array, or hash, and then pull out a slice, it makes more sense to me for this to be more "array like" than "list like"; the values before the last one are then in the dreaded void context if this object is then evaluated in a scalar context.

That is definitely enough musing from me about what is, to me, a very dusty little corner of perl.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://44410]
[LanX]: they have a constitutional referendum in turkey, kind of "do you want a dictator" and everybody opting no gets problems ...
[Corion]: LanX: Random Auto Expand?
[Corion]: LanX: Well, everybody opting "yes" will also get problems. The question is more like "Do you want problems now or problems later?"
[LanX]: and the AA had posters with a big say NO with a small "to alcohol"
[ambrus]: LanX: is it the kind of free and secret vote where there's only one box you can check?
[LanX]: no two boxes , enemies of the state are just denounced
[LanX]: like judges in Britain or the US

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2017-03-27 12:20 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (320 votes). Check out past polls.