• +91 9723535972
  • info@interviewmaterial.com

Perl Interview Questions and Answers

Question - Where the command line arguments are stored and if you want to read command-line arguments with Perl, how would you do that?

Answer -

The command line arguments in Perl are stored in an array @ARGV.

$ARGV[0] (the first argument)

$ARGV[1] (the second argument) and so on.

$#ARGV is the subscript of the last element of the @ARGV array, so the number of arguments on the command line is $#ARGV + 1

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners