Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Array indexing and string manipulation

by tobyink (Canon)
on Mar 26, 2012 at 16:21 UTC ( [id://961703]=note: print w/replies, xml ) Need Help??


in reply to Array indexing and string manipulation

for my $i (0 .. $#array) { substr($string, $i, 1) = lc substr($string, $i, 1) if $array[$i] eq q(); }

Update: As always, TIMTOWTDI...

$altered_string = join q(), map { my $char = substr($string, $_, 1); $array[$_] eq q() ? lc($char) : $char; } 0 .. length $string;
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-26 05:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found