wow, thanks. this is the closest to what i wanted to do first, so i'll
use this.
> my $response = 0;
> while ( $response != 1 and $response != 2 and $response != 3 ) {
> print "What would like to do?\n";
> print "1. Start a new file\n";
> prin
This doesn't do what you think it does.
unless ($response eq '1' || '2' || '3')
It says, unless the response was eq to 1, or if 2 is true, or if 3 is true.
2 and 3 are true by definition so this will always be true. I think you
want
unless ($response eq '1'
or $r
--- Chris Zubrzycki <[EMAIL PROTECTED]> wrote:
> Hey everybody. I have a simple problem that has been stumping me. I'm
> using Perl 5.6.1 on Mac OS X 10.1.1. This is a sub for opening a file in
> my program. this is the sub, and the problem is when i run it, if i do
> not enter a number 1-3, it
; do { your statements here };
$response == 2 && do { your other statements here };
}
-Original Message-
From: Chris Zubrzycki [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 18, 2001 4:45 PM
To: [EMAIL PROTECTED]
Subject: testing input/loops
Hey everybody. I have a si
Hey everybody. I have a simple problem that has been stumping me. I'm
using Perl 5.6.1 on Mac OS X 10.1.1. This is a sub for opening a file in
my program. this is the sub, and the problem is when i run it, if i do
not enter a number 1-3, it keeps asking me forever to enter a number.
Even if I