in reply to Only
The eval with braces will trap the die if Time::Hires is not on your system.if ( eval { require Time::Hires } ) { # The require was successful } else { # It was unsuccessful }
Cheers,
Ovid
Update: Whups! Since I hadn't used Time::Hires before, I wasn't aware of what it does internally. I suspect that autark's correction below is appropriate.
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (Ovid - try eval)Re: Only
by autark (Friar) on Dec 11, 2000 at 22:48 UTC |