I'm doing something simple but can't seem to get the syntax right. Maybe someone can help.
I'm trying to take this basic working array and add an if/else to it:
[tt]
%use_this = (
'NO',0,
'YES',100
);
[/tt]
An early attempt:
[tt]
if {$Status eq 'Domestic'
%use_this =
('NO',0,
'YES',100);
}
elsif {$Status eq 'Foreign'
%use_this =
('Required for international',100);
}
[/tt]
I tried about everything else I could think of and ended up with this, which also gives a syntax error. Basically, I'm not sure how to use if/else with an array!
[tt]
%use_this =
if {
$Status eq 'Domestic'
('NO',0,
'YES',100);
}
else {
$Status eq 'Foreign'
('Required for international',100);
}
[/tt]
Thanks!
Don
don@ctagroup.org
Experienced in HTML, Perl, VBScript, PWS, IIS and Apache. Run OS/2 Warp 4, BeOS v5 and Windows NT (only when I have to!)
I'm trying to take this basic working array and add an if/else to it:
[tt]
%use_this = (
'NO',0,
'YES',100
);
[/tt]
An early attempt:
[tt]
if {$Status eq 'Domestic'
%use_this =
('NO',0,
'YES',100);
}
elsif {$Status eq 'Foreign'
%use_this =
('Required for international',100);
}
[/tt]
I tried about everything else I could think of and ended up with this, which also gives a syntax error. Basically, I'm not sure how to use if/else with an array!
[tt]
%use_this =
if {
$Status eq 'Domestic'
('NO',0,
'YES',100);
}
else {
$Status eq 'Foreign'
('Required for international',100);
}
[/tt]
Thanks!
Don
don@ctagroup.org
Experienced in HTML, Perl, VBScript, PWS, IIS and Apache. Run OS/2 Warp 4, BeOS v5 and Windows NT (only when I have to!)