PonGopi has asked for the wisdom of the Perl Monks concerning the following question:
I dont know if we can give like this, but I was just trying to give if stmt in multiple ways.#!/usr/bin/perl $a = "a"; $b = "b"; $c = "c"; $d = "d"; $e = "e"; if (($a, $b, $c, $d, $e) eq ("ea", "eb", "ce", "de", "e")) { print "success"; } else { print "failure"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Multiple check in If statement ??
by anniyan (Monk) on Jul 11, 2005 at 07:06 UTC | |
by ysth (Canon) on Jul 11, 2005 at 15:59 UTC | |
Re: Multiple check in If statement ??
by dirac (Beadle) on Jul 11, 2005 at 10:37 UTC | |
Re: Multiple check in If statement ??
by neniro (Priest) on Jul 11, 2005 at 07:06 UTC | |
by Enlil (Parson) on Jul 11, 2005 at 08:00 UTC | |
by neniro (Priest) on Jul 11, 2005 at 08:12 UTC | |
by Thilosophy (Curate) on Jul 11, 2005 at 07:52 UTC | |
by neniro (Priest) on Jul 11, 2005 at 07:55 UTC |