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.

Comments

Popular posts from this blog

solved ERROR You installed yt-dlp from a manual build or with a package manager

vorago stela 100 no enciende

lanix neuron a v20