$ more eval #!/usr/bin/perl $code = 'if($a>$b){ $result =1} '; $a =1; $b = 0; $result =0; eval $code; print "eval error\n" if($@); print $result; $ eval $ perl -v This is perl, v5.8.2 built for sun4-solaris Copyright 1987-2003, Larry Wall
| You can see what's happened on my computer,there are nothing . |
| Which perl version do you use ?Maybe it is a bug? |
| thanks! |
In reply to Re: Re: How to use eval?
by iwanthome
in thread How to use eval?
by iwanthome
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |