Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: String replacement

by Tanalis (Curate)
on Jul 21, 2005 at 14:30 UTC ( #476850=note: print w/replies, xml ) Need Help??


in reply to String replacement

Probably not the best way to do it, but this works:
my $a = "ABABA"; my $b = "BB--B-BB"; $b =~ s/B/\%c/g; printf $b, unpack 'c*', $a;
Gets rid of the loop, at least *grin*.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://476850]
help
Chatterbox?
[Discipulus]: choroba's tk cb client become incerdibly stable after https switch; it's a coincidence?
[Discipulus]: it hits some read timeouts but reconnect without issues

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2018-06-19 07:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (111 votes). Check out past polls.

    Notices?