elsiddik has asked for the wisdom of the Perl Monks concerning the following question:
can i use it this way?use strict; while(1) { print "please enter a guess from 1 to 100: "; chomp(my $guess = <STDIN>); if ($guess =~ /quit|exit|^s*$/i) { print " sorry you gave up.the number was $secret.\n"; last; } no strict; elsif ($guess < $secret) { print "you failed \n"; }
Edit: g0n - code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to enable, disable strict
by shmem (Chancellor) on Apr 25, 2007 at 08:41 UTC | |
by elsiddik (Scribe) on Apr 25, 2007 at 09:05 UTC | |
|
Re: how to enable, disable strict
by marto (Cardinal) on Apr 25, 2007 at 09:31 UTC | |
by elsiddik (Scribe) on Apr 25, 2007 at 10:20 UTC | |
by GrandFather (Saint) on Apr 25, 2007 at 10:37 UTC | |
by elsiddik (Scribe) on Apr 25, 2007 at 10:58 UTC |