in reply to regular expressions
#!/usr/bin/perl -w use strict; my @words = qw(COMA STORAMA HISTOROMA PUMA MELANOMA STOROMA); for my $str ( @words ) { if ($str =~ /OMA$/ and $str !~ /STOROMA$/ ) { print "$str\n"; } }
------------------------------------------------------------
"Perl is a mess
and that's good because the
problem space is also a mess." - Larry Wall
|
|---|