Hi
Hello.
I have two strings 0x1479ee und 0x1479fe.
The strings a in $var1 and $var2.
if I do: if ( $var2 =~ /\Q$var1\E/)
It matches.
You sure about that?
#!/usr/bin/perl
my($var1, $var2) = ("0x1479ee", "0x1479fe");
if ($var2 =~ /\Q$var1\E/) { print "They matched.\n"; } else { print "They didn't match.\n"; }
__END__
The above gives me "They didn't match." as expected.
how can I match an the string and not on each sign?
The obvious answer is that they can't. Because of that, those variables probably don't contain what you think they contain.
Hope that helps.
James
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>