Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Sort list by position of items in another list

by alexander_lunev (Pilgrim)
on Feb 18, 2022 at 18:44 UTC ( [id://11141480]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @sizes = qw/6XS 5XS 6XL L S xL m 3xs/;
    
    ...
    print join(' ', @sizes). "\n";
    print join(' ', sort $sort_sizes_sub @sizes). "\n";
    
  2. or download this
    6XS 5XS 6XL L S xL m 3xs
    6XS 5XS 3xs S m L xL 6XL
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11141480]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-03-28 23:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found