On Friday, Feb 28, 2003, at 17:19 US/Pacific, Ian V�nnman wrote:
Whenever it finds a match it makes the checkbox checked. The problem I'm having is comparing email-adresses:
if ("$_" eq "$Account") { Make the checkbox checked here... }
$_ may be [EMAIL PROTECTED] and $Account may be
[EMAIL PROTECTED], but they don't match because @aftonbaldet is
treated as an array. How do I get the eq to ignore the @?
there must be some other issue in play here.
Since I can not replicate your problem - see the test script at the end.
Are you sure that you are getting the @ double parsed????
ciao drieux
--- the output:
matched with double quote
matched without quote - [EMAIL PROTECTED]
no match with double quotes
no match without quotes - [EMAIL PROTECTED] vice [EMAIL PROTECTED]
the code:
#!/usr/bin/perl -w
use strict; my $name = '[EMAIL PROTECTED]';
my $accName = '[EMAIL PROTECTED]';
my $Oname = '[EMAIL PROTECTED]';
doMe($name, $accName);
doMe($name, $Oname);
#------------------------
#
sub doMe {
my ($tag, $Account ) = @_;
$_ = $tag;
if ("$_" eq "$Account") {
print "matched with double quote\n";
}
else
{
print "no match with double quotes\n";
}
if ($_ eq $Account) {
print "matched without quote - $Account \n";
}
else
{
print "no match without quotes - $Account vice $_\n";
}
} # end of doMe
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
