On Tue, Jul 31, 2001 at 01:52:03PM +0200,  Marc A. Lehmann  wrote:
> On Mon, Jul 30, 2001 at 05:48:10PM -0400, Ronald J Kimball 
><[EMAIL PROTECTED]> wrote:
> > > sub sort_lists {
> > >    for (@_) {
> > >       sort @$_;
> > >    }
> > > }
> > 
> > That's actually in void context.
> 
> not in all versions of perl ;)

In which version of perl would the sort statement above not be in void
context?

> anyway, try it with "if", which works in all versions:
> 
>   sort @x unless $no_sort;
> 
> changes behaviour depending on wether it's the last statement in a block or
> not.

That's a better example.

Ronald

Reply via email to