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