About: How to read command-line arguments in a PERL script   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

To read arguments from a PERL script you use the environment variable ARGV. * Arguments are stored in the array @ARGV * First Argument: $ARGV[0] * Second Argument: $ARGV[1] * Third Argument: $ARGV[2] * etc. * Example * ./script.pl arg1 num2 bob * $ARGV[0] == "arg1" * $ARGV[1] == "num2" * $ARGV[2] == "bob" * To get the total number of arguments * $numberOfArguments = $#ARGV + 1; * To read all arguments as one string * $arg_string=join(' ',@ARGV);

AttributesValues
rdfs:label
  • How to read command-line arguments in a PERL script
rdfs:comment
  • To read arguments from a PERL script you use the environment variable ARGV. * Arguments are stored in the array @ARGV * First Argument: $ARGV[0] * Second Argument: $ARGV[1] * Third Argument: $ARGV[2] * etc. * Example * ./script.pl arg1 num2 bob * $ARGV[0] == "arg1" * $ARGV[1] == "num2" * $ARGV[2] == "bob" * To get the total number of arguments * $numberOfArguments = $#ARGV + 1; * To read all arguments as one string * $arg_string=join(' ',@ARGV);
dcterms:subject
abstract
  • To read arguments from a PERL script you use the environment variable ARGV. * Arguments are stored in the array @ARGV * First Argument: $ARGV[0] * Second Argument: $ARGV[1] * Third Argument: $ARGV[2] * etc. * Example * ./script.pl arg1 num2 bob * $ARGV[0] == "arg1" * $ARGV[1] == "num2" * $ARGV[2] == "bob" * To get the total number of arguments * $numberOfArguments = $#ARGV + 1; * To read all arguments as one string * $arg_string=join(' ',@ARGV);
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software