in reply to hash slice ? No thanks, I'm about to return...

From perldoc perlsub: The return value of a subroutine is the value of the last expression evaluated by that sub...

The value of an assignment operation in list context is generally the value(s) being assigned. Thus, when you're assigning a list to something, that's the value of the assignment and therefore that's the return value of the subroutine.

Cheers,
Ovid

New address of my CGI Course.

  • Comment on Re: hash slice ? No thanks, I'm about to return...

Replies are listed 'Best First'.
Re^2: hash slice ? No thanks, I'm about to return...
by leriksen (Curate) on Feb 20, 2005 at 00:39 UTC
    Thanx Ovid, now I guess I'll have to research what circumstances are not covered by the "generally"
    ....starts shuffling through rudely stacked piles of perldoc covering his desk...

    ...it is better to be approximately right than precisely wrong. - Warren Buffet