Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: Sort list by position of items in another list

by rsFalse (Chaplain)
on Feb 20, 2022 at 20:13 UTC ( #11141522=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $pchr = "KQRBNP";
    my $w1 = "QRKPNBNBQRK";
    ...
    }
    
    print "$w1 -> $w2\n"
    
  2. or download this
    my $pchr = "KQRBNP";
    my $w1 = "QRKPNBNBQRK";
    ...
    $w1 =~ m/^(?:$re)(?<=(.))(?{ $w2 .= $1 })(*FAIL)/;
    
    print "$w1 -> $w2\n"
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2022-10-04 16:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred way to holiday/vacation is:











    Results (18 votes). Check out past polls.

    Notices?