You know, this sounds awfully like the question "Sherri" asked a couple of
days ago... See the below thread.

-----Original Message-----
From: John Edwards [mailto:[EMAIL PROTECTED]]
Sent: 15 November 2001 11:51
To: 'Sherri'; [EMAIL PROTECTED]
Subject: RE: Help with PERL


See the list FAQ. Section 2.2 http://learn.perl.org/beginners-faq

Having said that, a good place to start would be
http://www.amazon.com/exec/obidos/ASIN/1884777805/ref%3Dase%5Fthevirtualmirr
or/103-8967786-7966216 and http://www.google.com/search?q=perl+merge+hash

John

-----Original Message-----
From: Sherri [mailto:[EMAIL PROTECTED]]
Sent: 14 November 2001 21:50
To: [EMAIL PROTECTED]
Subject: Help with PERL
Importance: High


I am a student. I have an assign where my instructor asked me to do the
following: (and I don't know where to begin, please advise, I would greatly
appreciate it)

"Write a program that will merge two hashes together onto a third hash
called %h3.  Return a reference to %h3 to the main program and print each of
the values of the hash %h3 using the arrow notation. Name the actual
function performing the merge mergehash. Pass %h1 and %h2 to mergehash as
references, do not create extra variables for the pass."

-----Original Message-----
From: jonathan vandine [mailto:[EMAIL PROTECTED]]
Sent: 16 November 2001 13:43
To: [EMAIL PROTECTED]
Subject: hash concatenation


I am trying to pass to hashes to a subroutine and combine into one hash. 
Then return that hash as a reference to the main program. Then print the 
result of new hash.


%h1     = ("key1" => value1);
%h2     = ("key2" => value2);
$rnew = &mergehash(\%h1, \%h2);
        sub mergehash{
                %h3 = @_;
                return \%h3;
        }
print $rnew->{key1};


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------Confidentiality--------------------------.
This E-mail is confidential.  It should not be read, copied, disclosed or
used by any person other than the intended recipient.  Unauthorised use,
disclosure or copying by whatever medium is strictly prohibited and may be
unlawful.  If you have received this E-mail in error please contact the
sender immediately and delete the E-mail from your system.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to