Solved

Catch Error Fall Under Sleep

Posted on 2006-12-01
5
157 Views
Last Modified: 2010-03-05
Hi,

I am doing data transfer for 10 mts .

After I start the Data Transfer I put the sleep 10 mts .

1) If Data Transfer stop after 5 mts(due to some reason) so their is way in a Perl to Under this error.

2) Script will show the error  after the 5 mts.

Question : How to Handle Error while we invoke Sleep ?










0
Comment
Question by:gauravflame
  • 2
  • 2
5 Comments
 

Author Comment

by:gauravflame
Comment Utility
rehrase

1) ...their is a way in Perl to catch this error.

0
 
LVL 84

Expert Comment

by:ozo
Comment Utility
alarm
0
 

Author Comment

by:gauravflame
Comment Utility
How I can use this alarm with

sleep 600;


Thanks
0
 
LVL 9

Accepted Solution

by:
Suhas . earned 100 total points
Comment Utility
Hi gauravflame,
you can use the benchmark for the total time taken for copying the script,
if its less than 600sec then send a mail with proper error message to concern person.

for more reference go through the module
http://search.cpan.org/dist/perl/lib/Benchmark.pm

Cheers!
Suhas
0
 
LVL 9

Expert Comment

by:Suhas .
Comment Utility
for sending the mail you can use MIME::Lite module
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now