leons has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use strict; BEGIN{push @INC,"$ENV{'SM'}/../bin";}; require 'errors.pm';
#!/usr/bin/perl -w my $Err; BEGIN{$Err=1 unless $ENV{'SM'}; push @INC,"$ENV{'SM'}/../bin";}; die "Environment string: \$SM not set\n" if $Err; require 'errors.pm';
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Returning information from BEGIN
by arturo (Vicar) on Feb 21, 2001 at 19:58 UTC | |
by leons (Pilgrim) on Feb 21, 2001 at 20:02 UTC | |
Re: Returning information from BEGIN
by chipmunk (Parson) on Feb 21, 2001 at 20:52 UTC | |
by leons (Pilgrim) on Feb 21, 2001 at 21:15 UTC | |
Re: Returning information from BEGIN
by dash2 (Hermit) on Feb 21, 2001 at 20:06 UTC | |
by leons (Pilgrim) on Feb 21, 2001 at 20:50 UTC | |
by tye (Sage) on Feb 22, 2001 at 00:21 UTC | |
Re: Returning information from BEGIN
by princepawn (Parson) on Feb 22, 2001 at 01:27 UTC |