Hello Rakesh, On Sat, 8 Mar 2014 18:20:48 +0530 rakesh sharma <rakeshsharm...@hotmail.com> wrote:
> Hi all, > how do you get all words starting with letter 'r' in a string. > thanks,rakesh > 1. Find all words in the sentence. Your idea of what is a word will need to be specified. 2. Put them in an array - let's say @words. 3. Use « grep { /\Ar/i } @words » . See: * http://perldoc.perl.org/functions/grep.html * https://metacpan.org/pod/List::MoreUtils * https://metacpan.org/pod/List::Util Regards, — Shlomi Fish -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ Escape from GNU Autohell - http://www.shlomifish.org/open-source/anti/autohell/ There is an IGLU Cabal, but its only purpose is to deny the existence of an IGLU Cabal. — Martha Greenberg Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/