When I run this script,

        $result = `$WGET $file`;
        print $result . "\n";
        if ( $result =~ m/saved/ ){
            print "MATCH\n";
        } else {
            print "NO MATCH\n";
        }

It outputs,

        2008-11-11 07:43:34 (526 KB/s) - `test.zip' saved [1517245/1517245]
        NO MATCH

But if I change,

-       $result = `$WGET $file`;
+       $result = "2008-11-11 07:43:34 (526 KB/s) - `test.zip' saved
[1517245/1517245]";

the script now outputs

        2008-11-11 07:43:34 (526 KB/s) - `test.zip' saved [1517245/1517245]
        MATCH

Why doesn't the match,

        $result =~ m/saved/

work in the first case?

--JC

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to