in reply to Sorting @_

This not only is invalid syntax (I think you meant {} instead of () there), it's also far more expensive than just saying sort! What are you really trying to accomplish, or did I miss something entirely?

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
Re: Sorting @_
by vim (Initiate) on Nov 19, 2000 at 17:12 UTC

    Thank you :-)

    Yes, I misstyped the {}

    I try to get rid off my usual way to sort an argument to a sub, which is

    my @Data = @_; my @Sorted = sort {$a cmp $b} @Data;

        Thanks again :-)