in reply to Re: scalar doesn't work values returned by a function?
in thread scalar doesn't work values returned by a function?
This is probably not a problem, since ZZamboni's code doesn't seem to want the last value from the sorted list. It is, however an entirely plausible reason to try: (To get the last sorted value) scalar(sort @array)
This is just a bit of a bummer, since it forces some kinda ugly syntax to do something which ZZamboni's code feels like it should just naturally do.
Russmy @a = ('a','b','c'); print ((sort @a)[$#a]);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: Re: scalar doesn't work values returned by a function?
by perlmonkey (Hermit) on May 10, 2000 at 08:38 UTC | |
by Russ (Deacon) on May 11, 2000 at 08:27 UTC | |
by perlmonkey (Hermit) on May 11, 2000 at 09:12 UTC | |
by ZZamboni (Curate) on May 11, 2000 at 09:37 UTC | |
by perlmonkey (Hermit) on May 11, 2000 at 11:08 UTC |