Looking for a good way to skip a set of operations, If one is TRUE ; Then Skip the rest. Also not sure if I really should have it on the last "IF", just to be consistent?

if($input_line =~ /UFRAME/){ @line_array=split(/,/, $input_line); #print "\n\n line_array = @line_array"; $UFRAME_index[$line_array[1]] = $line_array[1]; #print "\n\n UFRAME_index[$line_array[1]] = $UFRA +ME_index[$line_array[1]]"; $UFRAME_number[$line_array[1]] = $line_array[2]; #print "\n\n UFRAME_number[$line_array[1]] = $UFR +AME_number[$line_array[1]]"; $UFRAME_x[$line_array[1]] = sprintf("%.3f", $line_array[3]); #print "\n\n UFRAME_x[$line_array[1]] = $UFRAME_x +[$line_array[1]]"; if($UFRAME_x[$line_array[1]] != 0){ print "\n\n WARNING: UFRAME \[X\] value \($UFRAME_x[$l +ine_array[1]]\) is NOT ZERO \!"; $uframe_tilted = 1; #---------------- # JUMP FROM HERE #---------------- } $UFRAME_y[$line_array[1]] = sprintf("%.3f", $line_array[4]); #print "\n\n UFRAME_y[$line_array[1]] = $UFRAME_y +[$line_array[1]]"; if($UFRAME_y[$line_array[1]] != 0){ print "\n\n WARNING: UFRAME \[Y\] value \($UFRAME_y[$l +ine_array[1]]\) is NOT ZERO \!"; $uframe_tilted = 1; #---------------- # JUMP FROM HERE #---------------- } $UFRAME_z[$line_array[1]] = sprintf("%.3f", $line_array[5]); #print "\n\n UFRAME_z[$line_array[1]] = $UFRAME_z +[$line_array[1]]"; if($UFRAME_z[$line_array[1]] != 0){ print "\n\n WARNING: UFRAME \[Z\] value \($UFRAME_z[$l +ine_array[1]]\) is NOT ZERO \!"; $uframe_tilted = 1; #---------------- # JUMP FROM HERE #---------------- } $UFRAME_Rx[$line_array[1]] = sprintf("%.3f", $line_array[6]); #print "\n\n UFRAME_Rx[$line_array[1]] = $UFRAME_ +Rx[$line_array[1]]"; if($UFRAME_Rx[$line_array[1]] != 0){ print "\n\n WARNING: UFRAME \[Rx\] value \($UFRAME_Rx[ +$line_array[1]]\) is NOT ZERO \!"; $uframe_tilted = 1; #---------------- # JUMP FROM HERE #---------------- } $UFRAME_Ry[$line_array[1]] = sprintf("%.3f", $line_array[7]); #print "\n\n UFRAME_Ry[$line_array[1]] = $UFRAME_ +Ry[$line_array[1]]"; if($UFRAME_Ry[$line_array[1]] != 0){ print "\n\n WARNING: UFRAME \[Ry\] value \($UFRAME_Ry[ +$line_array[1]]\) is NOT ZERO \!"; $uframe_tilted = 1; #---------------- # JUMP FROM HERE #---------------- } $UFRAME_Rz[$line_array[1]] = sprintf("%.3f", $line_array[8]); #print "\n\n UFRAME_Rz[$line_array[1]] = $UFRAME_ +Rz[$line_array[1]]"; if($UFRAME_Rz[$line_array[1]] == 0){ print "\n\n WARNING: UFRAME \[Rz\] value \($UFRAME_Rz[ +$line_array[1]]\) is ZERO \!"; $uframe_tilted = 1; #---------------- # JUMP FROM HERE #---------------- } #-------------- # JUMP TO HERE #-------------- if ($uframe_tilted == 1){ print "\n\n WARNING: UFRAME \[$UFRAME_number[$line_arr +ay[1]]\] is \"Offset or Tilted\" \!\n"; print "\n X \= $UFRAME_x[$line_array[1]]"; print "\n Y \= $UFRAME_y[$line_array[1]]"; print "\n Z \= $UFRAME_z[$line_array[1]]"; print "\n Rx \= $UFRAME_Rx[$line_array[1]]" +; print "\n Ry \= $UFRAME_Ry[$line_array[1]]" +; print "\n Rz \= $UFRAME_Rz[$line_array[1]]" +; print "\n\nPlease confirm UFRAME \[$UFRAME_number[$line_ar +ray[1]]\] values are CORRECT \[Yes\/No\] ?" ; $selection_chosen = <STDIN>; }

In reply to Best way to "Skip" a set of operations by thnksnw

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.