Code

Bonjour,

Je voudrais savoir ce que signifie ce code Perl:

use strict;

if($#ARGV<1){
print "Usage: <trace file> <#of node>\n";
exit 0;
}


Merci de me répondre.

1 réponse

  • Votes
  • Date
  • Date décroissante
  1. Contributeur
    Salut choco90,

    S'il y a 0 ou 1 seul argument passé au script en ligne de commande, un message est affiché.

    https://perldoc.perl.org/perlvar

    The array @ARGV contains the command-line arguments intended for the script. $#ARGV is generally the number of arguments minus one, because $ARGV[0] is the first argument, not the program's command name itself. See $0 for the command name.

    Dal
    1. Salut Dal :)

      Merci pour la réponse :)