in reply to Re^2: How to escape from sub to beginning of script?
in thread How to escape from sub to beginning of script?

Ok got it. I`ve wrong inserted the until statement.
Thanks for your help :).
  • Comment on Re^3: How to escape from sub to beginning of script?

Replies are listed 'Best First'.
Re^4: How to escape from sub to beginning of script?
by Mery84 (Novice) on Mar 29, 2012 at 12:58 UTC
    The correct way for others who may reach this thread from google :)
    until ($question1 eq "0") { &pytaj(); if ($question1 eq '') { print "Nie wybrales zadnej opcji \n"; print "Zamykam.... \n"; sleep(5); exit(); } elsif ($question1 eq "1") { &backup(); } elsif ($question1 eq "2") { &restore(); } elsif ($question1 eq "3") { &testowanie(); } elsif ($question1 eq "4") { &full(); } elsif ($question1 eq "5") { &shared(); } elsif ($question1 eq "6") { &archive(); } elsif ($question1 eq "0") { print "Ok wiec koniec pracy. Zamykam.... \n"; sleep(5); exit(); } }