#!/usr/local/bin/perl -w
#/* Last edited: Oct 05 13:56 1998 (as1) */

package Sure;
use strict;

sub sure {
	my $message = shift;
	my $answer = '';

	while($answer !~ /^y\w?\w?$|^n\w?$/i){
		print STDOUT "\n$message? [y/n]: ";
		$answer = <STDIN>;
		if(!defined $answer){
			# keeps -w quite eg. when ^c pushed;
			$answer = '';
		}
	}
	if($answer =~ /^y\w?\w?$/i ){
		return 1;
	}
	return 0;
}



1;

