I know it's a reference to a hash. What I don't know is why it's printing out like this. I have hash values that I need to print out, but not in any order, so I put each hash value that I want to print in a join statement in the order I need them. The really strange part is that I also have a print statement to help me debug my code, and I print out each hash value. I commented out each part that printed a hash value to the screen, and only left the phrase: print "Printing hash values: \n";
When it printed, it still printed out a hash reference, like this: From the GetHdrLine function: HASH(0x1c6ed80)From the GetHdrLine function: HASH(0x1ab5300)From the GetHdrLine function: HASH(0x1c6eda4)From the GetHdrLine function: HASH(0x1ab52d0)From the GetHdrLine function: HASH(0x1ab5390)From the GetHdrLine function: HASH(0x1ab5330)From the GetHdrLine function: HASH(0x1cbe35c)From the GetHdrLine function: Why would it do that? Maybe I'm not being clear, so I can post code if it would be more helpful. I don't think I completely understand your code. When you put 'join( '|', values %hash )' what exactly do you mean? Should I put each hash value that I'm wanting to print, and then the word %hash? That doesn't seem to make any sense to me. I checked out perldoc perlref, but didn't see anything that pertains to joins, but maybe I'm missing something. I'm really grateful for your help, but could you be a bit more specific? I'd appreciate it. Thanks. Sean -----Original Message----- From: John W. Krahn [mailto:[EMAIL PROTECTED]] Sent: Saturday, September 21, 2002 5:32 AM To: [EMAIL PROTECTED] Subject: Re: join hashes? "Sean D. Rowe" wrote: > > ( this message was accidentally submitted under the subject RE: getpid? > Sorry ) > > I'm having a very strange problem that I'm hoping someone has come across > before. I'm using a hash to collect some field values. I want to write the > hash values to file, and I want them delimited by the '|' character, so I > use > > my $LineToWrite = join('|', hash_var_1, ..., hash_var_n) . "\n"; my $LineToWrite = join( '|', values %hash ) . "\n"; > I use this hash to get several different lines of field values, so this last > statement is in a function that gets called several times. The first time it > gets called, everything is fine. However, each time after, I get something > like this at the beginning of the $LineToWrite variable: > > HASH(0x1c67fc4) > > I also printed out each individual hash value, and I can't find anything > like this. What's going on? Any help would be appreciated. Thanks. This is a reference to a hash. perldoc perlref John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]