phemal has asked for the wisdom of the Perl Monks concerning the following question:
Now i use the below script to open the file and read the following in a string.our $FLAG_IPV4 = "0"; our $FLAG_IPV6 = "1"; our $DEBUG = "0"; our @attack_client_info = ("15.1.1.11","root","root123","15. +1.1.0/24","eth0","172.16.232.52");
now when i use the print statement,it gives me the value of global varibale presen in the above file.open CONFIG, "SENCONFIG" or die "Configuration file missing ...\n"; my $config = join "", <CONFIG>; eval $config or die "Failed to Evaluate SENCONFIG File...$@\n";
Can anyone help me understanding how that values are coming from the file to above print statement................print $FLAG_IPV4; ### O/P is 0
Note: I am not using "use strict" option here because it gives complia +tion error stating variable not defined.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: issue with the global variable.
by revdiablo (Prior) on Feb 17, 2007 at 07:10 UTC | |
Re: issue with the global variable.
by ikegami (Patriarch) on Feb 17, 2007 at 07:01 UTC | |
Re: issue with the global variable.
by rodion (Chaplain) on Feb 17, 2007 at 09:26 UTC | |
Re: issue with the global variable.
by Zaxo (Archbishop) on Feb 17, 2007 at 06:53 UTC | |
by phemal (Sexton) on Feb 17, 2007 at 06:59 UTC |