in reply to CGI coding style
Sure, it is not oo in style, but it can be easier to maintain.$state = 'initial_state'; while ($state ne 'completed') { if ($state eq 'state1') { #do something $nextstate = 'another state'; } if ($state eq 'state2') { # and so on } $state = $nextstate; # so we don't confuse our logic }
|
|---|