Chris Spurgeon on Tue, 22 Feb 2000 16:50:22 -0500 (EST) |
OK, I have this code..... #!/usr/bin/perl @group1 = qw(foo foofoo foo+++ bar bar+++ foobar); @group2 = qw(foo bar); foreach $teststring (@group1) { foreach $searcher (@group2) { $alteredsearcher = $searcher . "+++"; if ($teststring =~ /$alteredsearcher/) { print "Got a match with $teststring and $searcher\n"; } } } ... what I'm trying to do here is search for a series of strings, where the strings happen to end with the characters "+++". But perl is picking up those final characters in $alteredsearcher and it's seeing them as a syntax error instead of just three characters. What am I missing here? TIA. _____________________________________________________________ Chris Spurgeon | "So much time,...so little to do." WHYY webmaster | -- Stan Laurel ces@www.whyy.org | http://whyy.org | **Majordomo list services provided by PANIX <URL:http://www.panix.com>** **To Unsubscribe, send "unsubscribe phl" to majordomo@lists.pm.org**
|
|