Re: Use of uninitialized value in numeric ne error
- From: perlmunky@xxxxxxxxxxxxxx (Dan Klose)
- Date: Fri, 21 Dec 2007 17:46:07 +0000
On 21 Dec 2007, at 10:43, lerameur wrote:
Hello and cheers to all,
hello
I wrote a small program and it does work, but I get this error message
every tim I run the script:
Use of uninitialized value in numeric ne (!=) at ./reverse_string.pl
line 11.
basically it is a menu and when the user type 99 as a choice, the
program ends
if like is a string the you can't do != as it is a numerical comparison
line 11 is:
while ( $line != 99){
more of the script would be handy - as it looks (at a quick glance) as if $line is null.
thanks
ken
Dan.
--
To unsubscribe, e-mail: beginners-unsubscribe@xxxxxxxx
For additional commands, e-mail: beginners-help@xxxxxxxx
http://learn.perl.org/
.
- References:
- Use of uninitialized value in numeric ne error
- From: Lerameur
- Use of uninitialized value in numeric ne error
- Prev by Date: Re: Use of uninitialized value in numeric ne error
- Next by Date: Re: Ragged Hierarchy
- Previous by thread: Re: Use of uninitialized value in numeric ne error
- Next by thread: Re: Use of uninitialized value in numeric ne error
- Index(es):
Relevant Pages
|