Sun751 has asked for the wisdom of the Perl Monks concerning the following question:
Can any one help me, please. Cheerssub ReadCfg { my $file = $_[0]; our $err; { # Put config data into a separate namespace package CFG; # Process the contents of the config file my $rc = do($file); # Check for errors if ($@) { $::err = "ERROR: Failure compiling '$file' - $@"; } elsif (! defined($rc)) { $::err = "ERROR: Failure reading '$file' - $!"; } elsif (! $rc) { $::err = "ERROR: Failure processing '$file'"; } } return ($err); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help me to understand code
by GrandFather (Saint) on Jul 13, 2009 at 00:20 UTC | |
by Marshall (Canon) on Jul 13, 2009 at 01:02 UTC |