The strict Pragma : strict « Language Basics « Perl






The strict Pragma

   

#!/bin/perl

use strict "refs";
$animal="dog";
$dog="Tom";
print "${$animal}\n";
eval "\$$animal='Tom';";
print "${$animal}?\n";

   
    
    
  








Related examples in the same category

1.use strict 'refs';
2.use strict 'subs';
3.use strict 'vars';
4.use strict Pragma
5.use strict;
6.'use strict' and subroutine
7.'use strict' with package
8.no strict 'refs';
9.Using the strict Pragma