Hi all,
Can anyone help please?
# example values
$Charge = "55";
$CreditCard = "423452345654532";
$VisaCard = /^4\d{15}/;
$BankCard = /^(6565\d{12})|(555[10]00\d{10})/;
if ($Charge > 0 && (($VisaCard|$BankCard),$CreditCard) ) { # This bit
doesn't work?
Print "The credit card number is valid and the transaction is a
sale";
}elsif ($CreditCard = "" && $Charge < 0 ) { # Is "" ok for a null entry?
Print "No Credit card entered and the transaction is a refund";
}
Also is the "if (blah && blah)" bit ok?
If so what would be the syntax for or "if (blah or blah)"
Regards
Stuart Clark
- RE: Simple question Daniel Falkenberg
- simple question Stuart Clark
- Re: simple question sachin balsekar
- Re: simple question Michael Kelly
- Re: simple question Jonathan E. Paton
- Re: simple question Randal L. Schwartz
- Re: simple question Jonathan E. Paton
- RE: simple question Wagner-David
- RE: simple question Stuart Clark
- re: simple question david wright
- Re: simple question Stuart Clark
- Re: simple question Frank
- Re: simple question Sudarsan Raghavan
- Re: simple question Jeff 'japhy' Pinyan
- Re: simple question John W. Krahn
- RE: simple question Darren Simpson
- RE: simple question Nikola Janceski
- RE: simple question Bob Showalter
- Simple question suraj rajendran
- Re: Simple question Jeff 'japhy' Pinyan
- Re: Simple question Jeff 'japhy' Pinyan
