programming-examples/perl/SystemFunction/Behavior of eval.pl
2019-11-15 12:59:38 +01:00

5 lines
129 B
Perl

#!/usr/local/bin/perl
$myvar = 1;
eval ("print (\"hi!\\n\"); \$myvar = 2;");
print ("the value of \$myvar is $myvar\n");