You need an expression, something that can return a value. If you use something that doesn't return a value (like foreach), how could the elsif decide whether to enter or not? Your foreach doesn't even have a body, which makes even less sense.
elsif ($lec eq $outdate{$key1}) { foreach (@pmis) { if ($_ eq $outdate{$key1}) { ........ } } }
In reply to Re: Regarding the conditional part of eslif (or if) statement
by ikegami
in thread Regarding the conditional part of eslif (or if) statement
by ramjamman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |