#!/usr/bin/perl use strict; print "Enter password: \n"; chomp( my $answer = <> ); die "Incorrect password.\n" if ( $answer eq 'password' ); # ... main program is here #