- or download this
use warnings;
use strict;
...
{
print "Match $expr: '${$expr}' at position ($-[$expr],$+ [$expr])\n
+";
}
- or download this
Can't use string ("1") as a SCALAR ref while "strict refs" in use at m
+ytest.pl
line 11 (#1)
...
Uncaught exception from user code:
Can't use string ("1") as a SCALAR ref while "strict refs" in use
+at mytest.pl line 11.
at mytest.pl line 11.
- or download this
$name = "foo";
$$name = 1; # Sets $foo
...
&$name(); # Calls &foo() (as in Perl 4)
$pack = "THAT";
${"${pack}::$name"} = 5; # Sets $THAT::foo without eval
- or download this
use strict 'refs';