P is for Practical | |
PerlMonks |
Storing first letter of each element of @p in $xby renz (Scribe) |
on Jan 18, 2005 at 16:48 UTC ( [id://423083]=perlquestion: print w/replies, xml ) | Need Help?? |
renz has asked for the wisdom of the Perl Monks concerning the following question:
Problem: I need a means of storing only the first letter of an element of @p in $x, Super Search reveals nothing, and being new to perl I am unsure where I should begin solving this.. I guess the best way of illustrating the issue is to say that imagine that I need to generate an acronym: I would need a way to print "ICMP" ... Thanks, /renz. Update: Thanks for the help. It works fine, and I'll be busy for a bit reading up on substr and map for future use.
Back to
Seekers of Perl Wisdom
|
|