use strict 'refs'

Se puede ser mas especıfico y restringir solo el uso de referencias simbólicas con use strict 'refs':

$ cat symbol_ref2.pl
#!/usr/bin/perl -w

use strict 'refs';

$x = 4; # no se ha usado our
$a = "x"; # $a tampoco es declarada
$$a = 10;

print $x;
$ ./symbol_ref2.pl
Can't use string ("x") as a SCALAR ref while "strict refs" in use at ./symbol_ref2.pl line 7.

Casiano Rodríguez León
Licencia de Creative Commons
Principios de Programación Imperativa, Funcional y Orientada a Objetos Una Introducción en Perl/Una Introducción a Perl
por Casiano Rodríguez León is licensed under a Creative Commons Reconocimiento 3.0 Unported License.

Permissions beyond the scope of this license may be available at http://campusvirtual.ull.es/ocw/course/view.php?id=43.
2012-06-19