Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Any way to access the contents of a block eval?

by cdarke (Prior)
on Oct 10, 2007 at 15:39 UTC ( #643993=note: print w/replies, xml ) Need Help??


in reply to Any way to access the contents of a block eval?

Not directly so far as I know, but you can just about do this with a simple command, like this:
my $cmd = '1/0'; eval $cmd; if ($@) { print "$cmd gives: $@\n" } 1/0 gives: Illegal division by zero at (eval 1) line 2.
and that is not the block eval command that you asked for.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://643993]
help
Chatterbox?
[stevieb]: here I thought my Perl code was wrong, but it turns out I had a poor miscoonception of [https://arduino. stackexchange.com/ questions/42879/ reading-an-output- analog-pin-with-an -input-analog-pin
[stevieb]: meh... I'll try again
[stevieb]: I thought my Perl code was bad, but I misunderstood Arduino pins.

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2017-07-22 03:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (336 votes). Check out past polls.