RE: Populating a referenced hash

2001-11-16 Thread Dave Storrs
On Fri, 16 Nov 2001, Tomasi, Chuck wrote: > Good point. I should be a little more imaginative. Sometimes making up > meaningful variable and function names is the hardest part of writing code. It is indeed! > Another thing I found about the references, the order of the parameters >

RE: Populating a referenced hash

2001-11-16 Thread Wagner-David
ues etc. I guess the first thing is "What are you after? Then put together a hash and/or array to get what you need." Wags ;) -Original Message- From: Tomasi, Chuck [mailto:[EMAIL PROTECTED]] Sent: Friday, November 16, 2001 08:54 To: Wagner-David; '[EMAIL PROTECTED

RE: Populating a referenced hash

2001-11-16 Thread Tomasi, Chuck
(@$aref) loop walks right over the hash ref and I get information at the end of @leftovers "main::hash". --Chuck > -Original Message- > From: Dave Storrs [mailto:[EMAIL PROTECTED]] > Sent: Friday, November 16, 2001 11:38 AM > To: '[EMAIL PROTECTED]' > S

RE: Populating a referenced hash

2001-11-16 Thread Dave Storrs
This may or may not solve your problem, but Name your sub something other than 'ref'. Ref is a reserved word in Perl. (perldoc -f ref for details on what it does) Dave > > > --arg.pl--- > > > #/usr/plx/bin/perl -w > > > > > > use strict; > > > > > > sub ref > > > { >

RE: Populating a referenced hash

2001-11-16 Thread Tomasi, Chuck
> From: Bob Showalter [mailto:[EMAIL PROTECTED]] > Sent: Friday, November 16, 2001 11:29 AM > To: 'Tomasi, Chuck'; '[EMAIL PROTECTED]' > Subject: RE: Populating a referenced hash > > > > -Original Message- > > From: Tomasi, Chuck [mailto

RE: Populating a referenced hash

2001-11-16 Thread Bob Showalter
> -Original Message- > From: Tomasi, Chuck [mailto:[EMAIL PROTECTED]] > Sent: Friday, November 16, 2001 12:16 PM > To: 'Bob Showalter'; '[EMAIL PROTECTED]' > Subject: RE: Populating a referenced hash > > > > Your sub looks ok, but of cou

RE: Populating a referenced hash

2001-11-16 Thread Tomasi, Chuck
> Your sub looks ok, but of course we can't tell if any of > the regexes are actually matching. The regexes are matching. I put a quick forech() loop to print out the keys and their values. Everything looks OK at the end of the sub. > Instead of ${$href}{'UserID'}, which is valid syntax, the >

RE: Populating a referenced hash

2001-11-16 Thread Bob Showalter
> -Original Message- > From: Tomasi, Chuck [mailto:[EMAIL PROTECTED]] > Sent: Friday, November 16, 2001 11:54 AM > To: 'Wagner-David'; '[EMAIL PROTECTED]' > Subject: RE: Populating a referenced hash > > > My mistake on $hash{'$User

RE: Populating a referenced hash

2001-11-16 Thread Tomasi, Chuck
d [mailto:[EMAIL PROTECTED]] > Sent: Friday, November 16, 2001 10:29 AM > To: 'Tomasi, Chuck'; '[EMAIL PROTECTED]' > Subject: RE: Populating a referenced hash > > > Your print using: > print "User ID = $hash{'$UserID'}\n"; >

RE: Populating a referenced hash

2001-11-16 Thread Wagner-David
Your print using: print "User ID = $hash{'$UserID'}\n"; will use $UserID, but there is no such thing. In your sub, you are allowing only one value per assignment, ie your keys are UserID, AssignedTo, etc and there will be only one value. If you want multiple val