On 12/22/07, patmarbidon <[EMAIL PROTECTED]> wrote:
> or under win32
> while ( $line eq "99\r\n" ){
I /think/, under Perl, "\n" is the system newline, regardless of the OS.
Under Windows, it would still be "99\n"
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAI
What is the origin of $line ?
if you wrote $line = you should remove the "\n" and or "\r\n" at
the end of $line.
And if the user enter not numeric value you should always shuch an error.
You should check if the value is numeric or use 'eq' instead of '!=' .
If you removed the "\n" ou "\r\n"
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
I'd guess $line is never set before the first time it is compared to 99.
Either (1) change line 11 to:
$line = 0;
while ( $line != 99){
or (2) use a do-while loop.
do {
...
} while ( $line != 99);
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]