On Tue, 8 Jul 2008, luke devon wrote:
Hi
How can we define NULL values in perl ? for instance if I wanted to assign a NULL
value for a variable called "$x= , how would it be in the code ?
I never had a use for NULL outside C and I have no idea why you would
want it. Still, I would guess that you get it with an escaped zero:
$ perl -e '$s="\0";print $s,"X\n";'
X
~
$ perl -e '$s="aaaa\0";if($s=~/\0/){print "yes\n";}'
yes
~
$ perl -e '$s="aaaa";if($s=~/\0/){print "yes\n";}'
~
--
Jorge Almeida
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/