Thanks... 

My bad... I did not realize to use print instead of just "die"ing :)

Thanks,
Paryushan

-----Original Message-----
From: David Shere [mailto:dsh...@steelerubber.com] 
Sent: Friday, February 27, 2009 7:31 PM
To: Sarsamkar, Paryushan
Cc: beginners@perl.org
Subject: Re: Exception Handling in perl

On Fri, 2009-02-27 at 08:49 -0500, David Shere wrote:
> You can also have it do more than one thing:
> copy ("C:\\build.xml","D:\\build.xml") or ( print "Cannot copy : $!"
and
> somethingElse() );

Or you can have more fun:
unless (copy ("C:\\build.xml","D:\\build.xml")) {
   print "Cannot copy : $!";
   somethingElse();
   oneMoreThing();
   yetAnotherThing();
}

although I'm not sure if the "$!" is in scope in this example.


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to