Hi All, I am getting error while running following script.Error is due to improper if else loop and curly braces. Can you please guide me in placing the braces in right position and doing proper if..else looping
My requirement is that I want to quit as soon as "if condition" fails.Please guide if ($menu_item == 1) (if this condition fails then i want to quit) { $pvob=`$CT lsvob -s | grep apc`; chomp($pvob); my @proj=`$CT lsproj -invob $pvob | cut -d " " -f3`; [EMAIL PROTECTED]; print "The projects are.....\n\n"; my $i=1; foreach my $line(@proj) { print "\t" . $i++ . ". $line\n"; } print "Your Choice :\t"; chomp($choice = <STDIN>); if ($choice < $len){ (if this condition fails then i want to quit) print "Your choice: $proj[$choice-1]\n"; chomp($pro=$proj[$choice-1]); chomp($proj1=$pro . "@" . $pvob); #print "$proj1\n"; my $int_str=`$CT desc -fmt "%[istream]p" project:$proj1`;} else {quit();} elsif ($int_str eq "") { print "This project does not have Integration stream , so quiting.....\n"; exit; }(if this condition fails then i want to go to following else loop) else{ print "Integration Stream:$int_str\n"; dev_strm();} } else {quit();} Regards Irfan