스칼라 $quit
이 분명히 'j'와 같지 않은 후에 루프가 멈추지 않습니다. 왜 멈추지 않을까요?perl while 루프에서 eq 연산자로 예기치 않은 동작이 발생합니다. while 루프는 멈추지 않습니다
#!/usr/bin/perl -w
use strict;
my $quit = 'j';
while ($quit eq 'j') {
print "Enter whatever value you want and I bet I still continue.\n";
chomp (my $quit = <STDIN>);
print "quit equals: $quit\n";
}