break in perl

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pavanponnapalli
    New Member
    • May 2008
    • 51

    break in perl

    hi,
    How to come forcefully come out of a loop,but not from the program,
    like we use break statement in c. Is there any predefined function like break in perl?

    cheers,
    pavan
  • nithinpes
    Recognized Expert Contributor
    • Dec 2007
    • 410

    #2
    Hi pavan,

    'last' works like break in C. To give you a brief overview of control statements:
    last - come out of the statement block
    next - terminate current iteration and continue with next iteration(used in loops)
    continue - continue with the next block
    exit - exit the program/script


    -Nithin

    Comment

    • jeffjustice
      Banned
      New Member
      • Jul 2008
      • 9

      #3
      If you want it quickly:
      DELETED

      Comment

      Working...