#!/usr/bin/perl local ($bak_id)=shift; local ($acc_bal)=shift; $bak_id=<STDIN>; $acc_bal=<STDIN>; chomp ($bak_id); print "bak_id = $bak_id\n"; print "acc_bal = $acc_bal\n"; if (($acc_bal < 1.0 ) && ($bak_id eq "BOTH")) { print "condition 1\n"; } elsif (($acc_bal > 1.0 )&&($bak_id eq "BOTH")){ print "condition 2\n"; } elsif (($acc_bal < 1.0 ) && ($bak_id eq ("Cust1")||("Cust2"))) { print "condition 3\n"; } elsif (($acc_bal > 1.0 ) && ($bak_id eq ("Cust1"||"Cust2"))) { print "condition 4\n"; local ($choice); $choice=<STDIN>; if ($choice="YES") { print "condition 4.1\n" } elsif ($choice!="YES") { print "condition 4.2\n"; } } elsif (($bak_id eq "\n") || ($acc_bal eq "\n")) { print "return to MM\n"; } else { print ("Returning to Main Menu\n"); }
In reply to Detecting a Null or Enter key by John007
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |