John Giordano wrote:
>
> Hello,
>
> Could someone please tell me why this:
>
> ###
> $grep_deferred = system ('findstr DeferredStatus response1');
>
> print "$grep_deferred\n\n";
>
> if ($grep_deferred =~ /<a /) {
>
> print "It contains <a \n\n";
> } else {
>
> print "It doesn't contain <a\n\n";
> }
> ---------------------
> doesn't find this:
>
> <a
>
> The above code may need some further explanation. I am trying to extract
> the <a href from the above scalar $grep_deferred
>
> $grep_deferred has this in it:
>
> <a href="/c9410ee04de9845704db8951dfde015b/DeferredStatus"><img
> src="/images/btnstats.gif" width=120 height=40 border=0 alt="Mail
> Status"></a>
>
> < doesn't need a backslash in front of it right?
Correct, it doesn't. This test snippet works fine for me (I modified
your RE, but it works your way too):
use strict;
my $grep_deferred =
q{<a href="/c9410ee04de9845704db8951dfde015b/DeferredStatus">} .
q{<img src="/images/btnstats.gif" width=120 height=40 border=0 } .
q{alt="Mail Status"></a>};
print "$grep_deferred\n\n";
if ($grep_deferred =~ /<a\s+/i) {
print "It contains <a \n";
} else {
print "It doesn't contain <a\n";
}
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / ) // // DBE Collectibles http://www.todbe.com/
/ ) /--< o // // Mailto:[EMAIL PROTECTED] http://dbecoll.webjump.com/
-/-' /___/_<_</_</_ http://www.freeyellow.com/members/dbecoll/
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users