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

Re: A little golfing challenge: Replacing letters with numbers

by rsFalse (Hermit)
on Feb 21, 2019 at 17:27 UTC ( #1230317=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -0777 -ne 'print "" . ( join "", "A" .. "Z" ) =~ s/[^$_]/ /gr =~ 
    +s/\B\w+\B/-/gr =~ s/ +//gr'
    
  2. or download this
    A-IK-NP-TVWYZ
    
  3. or download this
    perl -0777 -ne 'print "" . ( join "", "A" .. "Z" ) =~ s/[^$_]/ /gr =~ 
    +s/(?<=\w)\w*(?=\w)/-/gr =~ s/ +/ /gr'
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2020-02-26 17:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?










    Results (117 votes). Check out past polls.

    Notices?