codice:
while (1) {
$my $text = <STDIN>;
chomp $text;
last if ($text eq 'exit');
}