Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re^2: Seeking a better way to do it

by Khen1950fx (Canon)
on Feb 01, 2013 at 05:27 UTC ( #1016442=note: print w/replies, xml ) Need Help??

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

    But starX's script also gives "Enter" word in the output. I guess he/she need to extract words contains Upper case letter

Re^3: Seeking a better way to do it
by frozenwithjoy (Priest) on Feb 01, 2013 at 05:30 UTC
    Ya, we really need more info. Limiting the first letter to F through Z is not very portable. If you already know the words you want (and choose the letters accordingly), you might as well name the words specifically.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1016442]
[holli]: you know, monk days are fun and all. but too many of them are bad for your health
[1nickt]: ...modern car. Suggests using TLA+ or other software modeling language to autogenerate code.
1nickt is not sure more and more layers separating the programmer from the program is the right way to go...
[holli]: happy one, shmem ;)
[1nickt]: I had an interview couople of weeks ago, heard from a principal engineer that a friend of his who works at The Google told him that the self-teaching software that determines the dynamic pricing for their adverts...
[1nickt]: ... has become so complex that there is no one at the Goole who knows what it does.
[marto]: William Gibson was right
[moritz]: a classical problem with machine learning
[1nickt]: moritz isn;t the difference today that the machine learning algos are in charge of most stuffs?
[moritz]: depends on what you mean by "most stuff"

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (13)
As of 2017-11-21 13:02 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (301 votes). Check out past polls.