I have a piece of code which will be used in two different environment,
One of the difference of the 2 system is a special library that is
avaiable to only one of them. Going into the cookbook I found example
12.2 very suitable for my need. So I created the following code to test
the idea
#!/usr/bin/perl
BEGIN
{
$mod = "CGI";
unless (eval "use $mod")
{
warn "unable to install $mod $@\n";
}
}
I expected this to work ok, but to my surprise, when I execute it, I get
this :
[htsang@victor htsang]$ ./test.perl
unable to install CGI
To verify CGI.pm is there, I did the following in the same machine.
[htsang@victor htsang]$ perl -MCGI -e "print \$CGI::VERSION"
2.56[htsang@victor htsang]$
Anyone has any idea what I did wrong?
Many thanks.
Tor.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]