in reply to what difference between eval and do ?
Another difference:
return is the return value of the eval itself, but the return value of the function calling do.sub hello_do { do { return; }; print "Hello from hello_do\n"; } sub hello_eval { eval { return; }; print "Hello from hello_eval\n"; } hello_do(); hello_eval(); __DATA__ Hello from hello_eval
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: what difference between eval and do ?
by Anonymous Monk on Apr 21, 2018 at 13:38 UTC |