Re: Exiting out of eval block...

2004-02-20 Thread Rob Dixon
Ajit P Singh wrote: > > I have a eval block and some if conditions within it and I would like to > exit the eval block. > i.e > > eval{ > my @resp = something; > if ((some condition)){ > $str_output = "do something"; > > I want to exit from hereto Reach Aft

Re: Exiting out of eval block...

2004-02-20 Thread Jenda Krynicky
From: "Singh, Ajit p" <[EMAIL PROTECTED]> > I have a eval block and some if conditions within it and I would like > to exit the eval block. i.e perldoc -f return return EXPR return Returns from a subroutine, "eval", or "do FILE" with the value given in EXPR. Evaluation of EX

Re: Exiting out of eval block...

2004-02-20 Thread Randy W. Sims
On 02/20/04 07:12, Singh, Ajit p wrote: Hello Friens, I have a eval block and some if conditions within it and I would like to exit the eval block. i.e You can use die or goto: #!/usr/bin/perl use strict; use warnings; eval { if (0) { print 'false' } if (1) { goto end_eval } }; print "before

Exiting out of eval block...

2004-02-20 Thread Singh, Ajit p
Hello Friens, I have a eval block and some if conditions within it and I would like to exit the eval block. i.e eval{ my @resp = something; if ((some condition)){ $str_output = "do something"; > I want to exit from hereto Reach After Eval