in reply to Re^2: Looking for less code
in thread Looking for less code
Point 2: I recommend taking some 'C' classes and you will understand the difference between "undef" and "zero".
Update: My comment about 'C' was not meant in a derogatory way. I stand by my assertion that code should run with both warnings and strict. Some performance increase can be obtained without warnings in well debugged code. But that was not the point here. There is a difference in general between, I know for sure that this $var is "false": ('',"",0) and I "don't know what the value is", (undef), so I am gonna assume "false".
Update: minor typo punctuation corrections.
#!/usr/bin/perl -w use strict; my $x = undef; print "$x\n"; $x = 0; print "$x\n"; #prints: #Use of uninitialized value $x in string at C:\TEMP\perl1.pl line 5. 0
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Looking for less code
by moritz (Cardinal) on Aug 11, 2009 at 09:22 UTC | |
by Marshall (Canon) on Aug 11, 2009 at 09:35 UTC | |
|
Re^4: Looking for less code
by JavaFan (Canon) on Aug 11, 2009 at 09:26 UTC | |
by Anonymous Monk on Aug 11, 2009 at 09:28 UTC | |
by Marshall (Canon) on Aug 11, 2009 at 09:49 UTC |