You want to avoid goto for this kind of thing - you are better off using a conditional looping construct:
update: removed the extraneous while#!/usr/bin/perl -w # + use strict; + my $value; + while ( not defined $value or $value eq 'R' ) { chomp($value = <STDIN>) + if ( $value eq 'E') { exit; } }
/J\
In reply to Re: Advice on goto usage?
by gellyfish
in thread Advice on goto usage?
by imperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |