#!/usr/bin/perl use strict; my $color; print "What is your favorite color? "; chomp ($color = ); print <>; print "Just to check, your favorite color is $color, right? "; $_ = ; if ( /^y/i ) { print "Phew!\n" } else { print "I don't believe you!\n"} #### perl myscript.pl random_file.txt