Posts

Showing posts with the label die

fix command terminated with non zero status

Hi, there! This is 11-die.pl code:   use strict; use warnings; my ($word) = @ARGV; #if (not defined $word) { if (! $word) {     #die("ERROR: please pass in a command line argument.\n");     # Command terminated with non-zero status. WHY ?? Es por die.       # This runs better:     print("ERROR: please pass in a command line argument.\n");     exit(0); } print(length($word),"\n"); Using perlbrew environment: perlbrew exec perl 11-die.pl SunApr21 8 perlbrew exec perl 11-die.pl ERROR: please pass in a command line argument.