Home > Software engineering >  How can I pass arguments for a subroutine from the command line
How can I pass arguments for a subroutine from the command line

Time:08-12

First off, my background is primarily in Python and I am relatively new at using Perl.

I am using tcsh for passing options into my .pl file.

In my code I have:

if( scalar @ARGV != 1)
{
    help();
    exit;
}

# Loading configuration file and parameters
our %configuration = load_configuration($ARGV[0]);

# all the scripts must be run for every configuration
my @allConfs = ("original");

sub Collimator 
{ 
     my $z = -25.0; 
     my            
  • Related