The '-w' helps you debug your code by producing warnings.  The code may
work, but $a has not been initialized when it reaches the if statement, so
it will always fail.  Is that really 'perfect'?  Why have the if block if
you know it will never be executed?  The easy, although prone to overuse,
solution is do initialize $a with a value when you declare it with the my
statement.

                                /\/\ark

-----Original Message-----
From: LRMK [mailto:lrmk@;rakhitha.cjb.net]
Sent: Tuesday, November 05, 2002 9:51 AM
To: [EMAIL PROTECTED]
Subject: Help on -w


#!/usr/bin/perl -w


my $a;

if ($a eq 'fff'){



}
above  line gives the error Use of uninitialized value in string eq at t.pl
line 6.

but when -w not used in top line it works perfect
what the -w really does


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to