Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Find First character of each word in a string

by biohisham (Priest)
on Nov 24, 2010 at 06:58 UTC ( #873368=note: print w/ replies, xml ) Need Help??


in reply to Find First character of each word in a string

Backreferencing is just another way to go

$string = "Internal Computing Department"; $string =~ s/(\w)\w*/$1\./g; print $string ; #OUTPUT I. C. D.



Excellence is an Endeavor of Persistence. A Year-Old Monk :D .


Comment on Re: Find First character of each word in a string
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (11)
As of 2015-07-08 05:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (94 votes), past polls