CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: Re: [ajitnavasare] problem in error handling.: Edit Log



toolic
User

Nov 20, 2009, 5:48 AM


Views: 588
Re: [ajitnavasare] problem in error handling.

If you want your program to die if the system call returns an error, you should not put the system inside the eval block. Also,
use die:


Code
system("start c:\\windows\\system32\\cmd1212.exe") and die "some useful message";



I updated my untested code above due to FishMonger's astute observation.



Code
perldoc -f system 
perldoc -f eval
perldoc -f die



(This post was edited by toolic on Nov 20, 2009, 6:01 AM)


Edit Log:
Post edited by toolic (User) on Nov 20, 2009, 6:01 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives