Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^6: Efficient way to replace a set of values with another set of values

by tobyink (Abbot)
on Nov 23, 2012 at 16:00 UTC ( #1005291=note: print w/replies, xml ) Need Help??


in reply to Re^5: Efficient way to replace a set of values with another set of values
in thread Efficient way to replace a set of values with another set of values

You were looking for:

s/^(\d+)/$n=$1;$l="a";$l++while--$n;$l/meg

Doesn't cope with 0 especially well.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
  • Comment on Re^6: Efficient way to replace a set of values with another set of values
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1005291]
help
Chatterbox?
[Discipulus]: ah! holidays i hope..
Discipulus without Corion and with choroba in another timezone the monastery was silent.. I was silbing alone in the cloister
[choroba]: Yes, I feel alone in the cyberspace...
[choroba]: Not many occasions to talk to my wife, either :-(
Discipulus s/silbing/whistle/ dunno from where this word was in my mind..
[Discipulus]: lost in time in space and in the meaning (rocky horror picture show)

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (8)
As of 2017-02-22 08:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (325 votes). Check out past polls.