Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Sorting result of function call

by Hofmator (Curate)
on Dec 20, 2006 at 09:29 UTC ( [id://590870] : perlquestion . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    say sort &get_keys();        # called:array:13
    say sort @{[get_keys]};      # called:array:13
    say sort @{[get_keys()]};    # called:array:13
    
  2. or download this
               NAME(LIST);    # & is optional with parentheses.
               NAME LIST;     # Parentheses optional if predeclared/import
    +ed.
               &NAME(LIST);   # Circumvent prototypes.
    
  3. or download this
    for my $type ( sort( filetypes_supported() ) ) {