Hash Key is a Null Value

2007-06-14 Thread Mathew Snyder
I'm building a hash using values from a database backend to an application we use in house. The application has a field which contains a customer name. This values is supposed to be set by the person handling the work but sometimes doesn't get done. This leaves a NULL value in the database which

Re: Hash Key is a Null Value

2007-06-14 Thread Jenda Krynicky
Date sent: Thu, 14 Jun 2007 06:29:56 -0400 From: Mathew Snyder <[EMAIL PROTECTED]> To: Perl Beginners Subject: Hash Key is a Null Value > I'm building a hash using values from a database backend to an application we

Re: Hash Key is a Null Value

2007-06-14 Thread Chas Owens
On 6/14/07, Mathew Snyder <[EMAIL PROTECTED]> wrote: I'm building a hash using values from a database backend to an application we use in house. The application has a field which contains a customer name. This values is supposed to be set by the person handling the work but sometimes doesn't ge

Re: Hash Key is a Null Value

2007-06-14 Thread Martin Barth
; 'bar' }; HTH Martin On Thu, 14 Jun 2007 14:03:10 +0200 "Jenda Krynicky" <[EMAIL PROTECTED]> wrote: > Date sent:Thu, 14 Jun 2007 06:29:56 -0400 > From: Mathew Snyder <[EMAIL PROTECTED]> > To: Perl Begin

Re: Hash Key is a Null Value

2007-06-14 Thread Paul Lalli
On Jun 14, 6:29 am, [EMAIL PROTECTED] (Mathew Snyder) wrote: > I'm building a hash using values from a database backend to an application we > use in house. The application has a field which contains a customer name. > This > values is supposed to be set by the person handling the work but somet

Re: Hash Key is a Null Value

2007-06-14 Thread Paul Lalli
On Jun 14, 8:03 am, [EMAIL PROTECTED] (Jenda Krynicky) wrote: > Date sent: Thu, 14 Jun 2007 06:29:56 -0400 > From: Mathew Snyder <[EMAIL PROTECTED]> > To: Perl Beginners <[EMAIL PROTECTED]> > Subject:

Re: Hash Key is a Null Value

2007-06-14 Thread Chas Owens
On 6/14/07, Paul Lalli <[EMAIL PROTECTED]> wrote: snip Have you tried examining your hash using Data::Dumper, to see what's *really* in it? use Data::Dumper; print Dumper(\%hash); snip You cannot always trust the output of Data::Dumper when it is printed. For instance, if I showed you the foll

Re: Hash Key is a Null Value

2007-06-14 Thread Paul Lalli
On Jun 14, 8:50 am, [EMAIL PROTECTED] (Chas Owens) wrote: > To force Data::Dumper to do the right thing for the > display you must set $Data::Dumper::Useqq to 1. It will then use > doublequoted strings and escape characters (like \t, \n, \0 etc). > > perl -MData::Dumper -e '$Data::Dumper::Useqq =

RE: Hash Key is a Null Value

2007-06-14 Thread Xu, Lizhe
On Jun 14, 8:50 am, [EMAIL PROTECTED] (Chas Owens) wrote: > To force Data::Dumper to do the right thing for the > display you must set $Data::Dumper::Useqq to 1. It will then use > doublequoted strings and escape characters (like \t, \n, \0 etc). > > perl -MData::Dumper -e '$Data::Dumper::Useqq =

Re: Hash Key is a Null Value

2007-06-14 Thread Rob Dixon
Xu, Lizhe wrote: On Jun 14, 8:50 am, [EMAIL PROTECTED] (Chas Owens) wrote: To force Data::Dumper to do the right thing for the display you must set $Data::Dumper::Useqq to 1. It will then use doublequoted strings and escape characters (like \t, \n, \0 etc). perl -MData::Dumper -e '$Data::Dumpe

RE: Hash Key is a Null Value

2007-06-14 Thread Xu, Lizhe
Key is a Null Value Xu, Lizhe wrote: > On Jun 14, 8:50 am, [EMAIL PROTECTED] (Chas Owens) wrote: >> To force Data::Dumper to do the right thing for the >> display you must set $Data::Dumper::Useqq to 1. It will then use >> doublequoted strings and escape characters

Re: Hash Key is a Null Value

2007-06-14 Thread Mathew
Looks like there's an extra single quote after Dumper(\%h); Keep up with my goings on at http://theillien.blogspot.com Xu, Lizhe wrote: > On Jun 14, 8:50 am, [EMAIL PROTECTED] (Chas Owens) wrote: >> To force Data::Dumper to do the right thing for the >> display you must set $Data::Dumper::Useqq t

Re: Hash Key is a Null Value

2007-06-14 Thread Mathew
The purpose of getting the data in the first place is to allow my boss to see that people are still not doing things they are supposed to. He can then send out reminders so we can establish better habits. My plan is to replace the null value with a description making it obvious that the value had

Re: Hash Key is a Null Value

2007-06-14 Thread Mathew
Erk...nevermind. didn't realize that was a continuance from the line above it. Keep up with my goings on at http://theillien.blogspot.com Xu, Lizhe wrote: > On Jun 14, 8:50 am, [EMAIL PROTECTED] (Chas Owens) wrote: >> To force Data::Dumper to do the right thing for the >> display you must set $D

Re: Hash Key is a Null Value

2007-06-14 Thread Chas Owens
On 6/14/07, Mathew <[EMAIL PROTECTED]> wrote: The purpose of getting the data in the first place is to allow my boss to see that people are still not doing things they are supposed to. He can then send out reminders so we can establish better habits. My plan is to replace the null value with a

Re: Hash Key is a Null Value

2007-06-14 Thread Mathew Snyder
I did this and set $Data::Dumper::Useqq = 1; this was the result: $VAR1 = { "" => 7, }; Nothing there. Does this mean I just have an empty string with neither a NUL value or anything else for that matter (physicists would be boggled ;) )? Mathew Keep up with me and what I'm up

Re: Hash Key is a Null Value

2007-06-14 Thread Chas Owens
On 6/14/07, Mathew Snyder <[EMAIL PROTECTED]> wrote: I did this and set $Data::Dumper::Useqq = 1; this was the result: $VAR1 = { "" => 7, }; Nothing there. Does this mean I just have an empty string with neither a NUL value or anything else for that matter (physicists would be

Re: Hash Key is a Null Value

2007-06-14 Thread Mathew Snyder
Sure enough. I must have typo'ed it before. Now it works just like you say it should. Thanks Mathew Keep up with me and what I'm up to: http://theillien.blogspot.com Chas Owens wrote: > On 6/14/07, Mathew Snyder <[EMAIL PROTECTED]> wrote: >> I did this and set $Data::Dumper::Useqq = 1; this wa