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 to: http://theillien.blogspot.com
Chas Owens wrote:
> 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 following output you would say that
> the key was an empty string.
>
> $VAR1 = {
> '' => 3
> };
>
> The key is actually the NUL character (ascii 0). The string
> Data::Dumper produced has the NUL character in it, put the display
> cannot show it. 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 = 1;%h = ("\0", 3);print
> Dumper(\%h);'
> $VAR1 = {
> "\0" => 3
> };
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/