Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: substitute within elements of array

by Anonymous Monk
on Apr 09, 2013 at 09:26 UTC ( #1027686=note: print w/replies, xml ) Need Help??


in reply to substitute within elements of array

but sadly it does not work

Sure it does

@array = qw[ SURE! IT! DOES! ]; foreach my $word (@array) { $word =~ s/(\.|\?|\!)$//; } die "@array"; __END__ SURE IT DOES at - line 6.

What is the reason you didn't post your @array?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1027686]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2017-02-25 11:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (365 votes). Check out past polls.