Use of uninitialized value $employ in print at 1094481.pl line 31 #### roboticus@sparky:~$ cat 1094481.pl #!/usr/bin/perl use strict; use warnings; my $employ = 'FOOBAR'; #------- 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, "\n"; roboticus@sparky:~$ perl 1094481.pl b b james doesnt have grade a