I am trying to compilate this scrip, but I have this message:
Can't locate Email/Address.pm in @INC (@INC contains: C:/strawberry/perl/lib C:/ strawberry/perl/site/lib C:\strawberry\perl\vendor\lib .) at C:/strawberry/perl/ lib/Regexp/Common/Email/Address.pm line 9. BEGIN failed--compilation aborted at C:/strawberry/perl/lib/Regexp/Common/Email/ Address.pm line 9. Compilation failed in require at (eval 1) line 1. BEGIN failed--compilation aborted at C:\examples\script2.pl line 4.
I don´t understand because I really have this root
C:/strawberry/perl/lib/Regexp/Common/Email/Address.pm
Does anybody know why I have this error message when I try to compilate my scrip?
Thank you so much
I tried to use this sentence:
use lib 'C:/strawberry/perl/lib/Regexp/Common/Email';
and putting as comment these two sentences:
use Regexp::Common qw[Email::Address];
use Email::Address
then I get this error
Global symbol "%RE" requires explicit package name at C:\examples\script2.pl lin
e 10.Execution of C:\examples\script2.pl aborted due to compilation errors.
I´ve taken a look at perldiag
Global symbol "%s" requires explicit package name (F) You've said "use strict" or "use strict vars", which indicates that all variables must either be lexically scoped (using "my" or "state"), declared beforehand using "our", or explicitly qualified to say which package the global variable is in (using "::").
but I find it a little theoretical for me by I understand that you have to use packages by using the sentence 'use' at the begging of the code.
By the way this is my code:
use Regexp::Common qw[Email::Address];
use Email::Address;
while (<>) {
my (@found) = /($RE{Email}{Address})/g;
my (@addrs) = map $_->address, Email::Address->parse("@found");
print "X-Addresses: ", join(", ", @addrs), "\n";
}
I get this code from a question I asked before.