Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Find First character of each word in a string

by GrandFather (Saint)
on Nov 24, 2010 at 02:24 UTC ( [id://873348]=note: print w/replies, xml ) Need Help??


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

A Perlish version might look something like:

#!/usr/bin/perl use strict; use warnings; my $str = "Internal Computing Department"; print join '', map {uc substr $_, 0, 1} split ' ', $str;

Prints:

ICD
True laziness is hard work

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-04-24 22:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found