#!/usr/bin/perl
# w5.19.pl  Uses while to search; quits and reports when found.
# usage:  w5.19.pl roses.txt

open(FH, "$ARGV[0]");
while (<FH>){
  if (m/drink/){
    $found = 1;
    last;
  }
}
close(FH);

if ($found){
  print "Thirst quenched at $ARGV[0]\n";
}
else {
  print "Drink not found in $ARGV[0]\n";
}
