Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Terms shortener :-)

by choroba (Bishop)
on Jan 09, 2018 at 13:29 UTC ( #1206973=note: print w/replies, xml ) Need Help??


in reply to Terms shortener :-)

For pre-5.20 perls, one needs -alpe , as a ins't implied by F .

I'd also try

perl -pe 's/.\K(.*)(?=.)/length$1/e'
(needs 5.10).

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^2: Terms shortener :-)
by reisinge (Hermit) on Jan 10, 2018 at 19:26 UTC

    Or even

    perl -pe 's/(?<=.)(.*)(?=.)/length$1/e'

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2019-10-20 21:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?