[oak perl] The mysterious "undef"
Jon Seidel, CMC
jseidel at edpci.com
Sat Mar 19 18:40:00 PST 2005
Sandy... One of the things that you'll use undef for is to act as a
placeholder for parameters. As I recall, there are MySql calls that often
require the use of undef, since you don't want to pass a value for, say,
parameters 2 and 3, but you have to give a value for parameters #4 and 5.
Thus, you would say something like:
$mysql->search($db, undef, undef, $text, $results)
Or something like that...if you're more familiar with the mysql interface,
feel free to correct my errors :)
...jon
> -----Original Message-----
> From: oakland-bounces at pm.org [mailto:oakland-bounces at pm.org]
> On Behalf Of Sandy Santra
> Sent: Friday, March 18, 2005 8:10 AM
> To: Oakland Perl
> Subject: [oak perl] The mysterious "undef"
>
>
> I keep seeing "undef" mentioned in the llama book.
>
> I've tried to define a variable as not having a value,
> theoretically being
> "undef," but when I use the print command, I never see
> "undef" print to my
> screen; nothing prints at all.
>
> I wanted to learn the different between a zero value and
> undef because the
> llama book keeps saying there is one. Is this a pointless
> issue to pursue?
>
> Clarification greatly appreciated. Thanks.
>
> _______________________________________________
> Oakland mailing list
> Oakland at pm.org
> http://mail.pm.org/mailman/listinfo/oakland
>
>
More information about the Oakland
mailing list