use strict;
use warnings;
sub XX { 30 };
my $rnd = 3;
my $z = -XX * $rnd;
Дайте ошибку: Can't use string ("3") as a symbol ref while "strict refs" in use
Это не поможет:
my $z = -XX * ($rnd);
Я получаю следующую ошибку:
Scalar found where operator expected at game4.pl line 7, near "* ($rnd"
(Missing operator before $rnd?)
syntax error at game4.pl line 7, near "* ($rnd"
Execution of game4.pl aborted due to compilation errors.
Какзаставить EXPR
вместо GLOB
разыменования?