Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Golf: Replacing part of a string with "*"

by explorer (Chaplain)
on Aug 18, 2006 at 15:30 UTC ( #568192=note: print w/replies, xml ) Need Help??


in reply to Golf: Replacing part of a string with "*"

More clean:

$string = '*' x 12 . substr($string,-4); # ************5678

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://568192]
help
Chatterbox?
[Discipulus]: nope
[choroba]: oh ok
[choroba]: so, each character outside the \0 - \ffff range gets replaced by its name
[Discipulus]: the latest version works in 5.24 and not in 5.14. previous one worked on both but crashed on both with merry rabbit
[Discipulus]: yes: replaced by its name
Discipulus why Win32 must exists?!?!
[choroba]: If you want rabbits and poo, install cygwin
[Discipulus]: no thanks! strawberry flavour is better than poo's one

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2017-09-19 11:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (219 votes). Check out past polls.

    Notices?