- or download this
my $temp = 'xxx$1';
my $repl = eval q{"$temp"};
- or download this
use strict;
use warnings;
...
--output:--
my $y = $x;
- or download this
my $x = 10;
...
--output:--
Global symbol "$y" requires explicit package name at 2perl.pl line 14.
Execution of 2perl.pl aborted due to compilation errors.
- or download this
my $x = 10;
eval {my $y = $x};
...
--output:--
Global symbol "$y" requires explicit package name at 2perl.pl line 14.
Execution of 2perl.pl aborted due to compilation errors.