Re: Eval Questions with blocks

2007-02-19 Thread Robert Boone
The general form for block eval is: #!/usr/bin/perl use strict; use warnings; eval { die 'There was an error!!!' . "\n"; }; if ($@) { print $@; } print 'On the other side.' . "\n"; Robert On Feb 19, 2007, at 4:13 PM, Gallagher, Tim F ((NE)) wrote: I am working my butt off trying

Eval Questions with blocks

2007-02-19 Thread Gallagher, Tim F \(NE\)
I am working my butt off trying to get eval blocks working. When I run a pert of perl code, if the code fails I dont want the script to terminate. Here is what I am talking about: [CODE] use Win32::Registry; eval{ my ($node) = 'ComputerName'; my ($hNode, $hKey, %values); $HKEY_LOCAL_MACHINE-