#!/usr/bin/perl use strict; use warnings; my $string; do { chomp($string = ); # do stuff print "entered: $string\n"; } until ($string eq 'exit');