in reply to Re: Seeking a better way to do it
in thread Seeking a better way to do it
I think the OP meant 'Iago' and 'Othello', so maybe something
similar to this:
#!/usr/bin/perl -l use strict; use warnings; my ($char_list) = "Enter Iago, Othello, and others"; my (@words) = split( /\W/, $char_list, 0 ); foreach my $word (@words) { if ( $word =~ m/[F-Z]\w+/g ) { push my (@entering_chars), $word; print "@entering_chars"; } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Seeking a better way to do it
by vinoth.ree (Monsignor) on Feb 01, 2013 at 05:30 UTC | |
Re^3: Seeking a better way to do it
by frozenwithjoy (Priest) on Feb 01, 2013 at 05:30 UTC | |
by vinoth.ree (Monsignor) on Feb 01, 2013 at 05:35 UTC |
In Section
Seekers of Perl Wisdom