in reply to Re: Loop walkthrough
in thread Loop walkthrough
here is the statement please run perl em.pl b b
my $james = $ARGV[0]; my $john = $ARGV[1]; if ($james =~ m/a/) { $employ = "james with grade a"; #pick james }elsif ($john =~ m/a/) { $employ = "John with grade a"; # pick john } elsif ($james =~ m/b/) { #$employ = "james doesnt have grade a"; } elsif ($john =~ m/b/) { #$employ = "john doesnt have grade a"; } elsif ($james =~ m/b/ && $john =~ m/b/) { $employ = "Both james and john doesnt have grade a \n"; } print $employ;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Loop walkthrough
by roboticus (Chancellor) on Jul 21, 2014 at 13:53 UTC | |
by beanscake (Acolyte) on Jul 21, 2014 at 14:18 UTC | |
by beanscake (Acolyte) on Jul 22, 2014 at 16:17 UTC | |
by Anonymous Monk on Jul 22, 2014 at 19:50 UTC | |
by roboticus (Chancellor) on Jul 22, 2014 at 17:44 UTC | |
|
Re^3: Loop walkthrough
by hippo (Archbishop) on Jul 21, 2014 at 14:00 UTC |