#!/usr/bin/perl
use strictandwarnings;
# use strict;
# use warnings;
# my $x;
print "$x\n";
$x = '$y';
print header(), start_html(), "\n";
####
package strictandwarnings;
require Exporter;
our @ISA = qw(Exporter);
sub import {
my ($pkg) = (caller)[0];
my $current = __PACKAGE__;
eval qq[
package $pkg;
use strict;
use warnings;
use CGI qw/:standard/;
package $current;
];
# optionally, if you still need import:
goto \&Exporter::import;
}
1;
####
Global symbol "$x" requires explicit package name at ./tst100.pl line 9.
Global symbol "$x" requires explicit package name at ./tst100.pl line 11.
Execution of ./tst100.pl aborted due to compilation errors.
####
Use of uninitialized value in concatenation (.) or string at ./tst100.pl line 9.