try some of these:
%person = ( # much easier to maintain this way. 1001 => { name => 'Jerry Calvin', email => 'jcalvin@aidusa.com'}, 1002 => { name => 'John Q. Random', email => 'jqrandom@aidusa.com'}, ); @lines = <FILE>; warn "wrong number of lines: $currentfile\n" unless (@lines == 5); chomp @lines; foreach $line (@lines) { ($name,$value) = split( /=/, $line); $value =~ s/^\s+//; $value =~ s/\s+$//; # 'g' isn't needed $data{$name} = $value; } # some more ()'s never hurt, sure this wasn't if (($data{'SONUMBER'} eq '') || ($data{'SALESPERSON'} eq '')) { $data{'SONUMBER'} = 'No S.O. attached'; $data{'SALESPERSON'} = 'No salesperson assigned'; &sendemailspecial; } else { &sendmailnormal; }
In reply to Re: Funny if else problem
by Anonymous Monk
in thread Funny if else problem
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |