You are not logged in.
Hello, this is the piece of code that I'm working here:
#!/usr/bin/perl
use strict;
use warnings;
my ($config_file) = @ARGV;
my $master_config = "MASTER_config.txt"
if (defined $config_file)
{
$master_config = $config_file;
}
print "The master config file is: $master_config\n\n";When I run it, I get this error:
Global symbol "$master_config" requires explicit package name at command_line_arguments3.pl line 12.I looked online, but I couldn't find an answer to my particular problem (and I'm fairly certain that I was looking in the wrong location as well.)
Any ideas why I'm getting this error?
[edit]
Ugh... I was missing a ';' at the end of line #8. Having a more precise error message would be nice.
Last edited by publicus (2014-07-16 16:25:30)
Offline