ATS on Tue, 22 Feb 2000 17:15:26 -0500 (EST)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Can I ask a quick stupid question?


At 04:47 PM 02/22/00 -0500, you wrote:

use .'\+\+\+'
note single quotes
it produces

Got a match with foo+++ and foo
Got a match with bar+++ and bar

Urb

#!/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";
}
}
}



#!/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";
        }
    }
}


**Majordomo list services provided by PANIX <URL:http://www.panix.com>** **To Unsubscribe, send "unsubscribe phl" to majordomo@lists.pm.org**