#!/usr/bin/perl -w use strict; while () { last if $_ eq "done\n"; print "You entered: $_"; } print "All done!\n";