Re: referencing and subroutines.

2001-08-17 Thread Walnut
Create the hash in the global part of the program. Pass a reference to the hash to the subroutine and manipulate that. On Tue, 17 Apr 2001 22:37:36 +0200, [EMAIL PROTECTED] (Martijn Van Exel) wrote: >Hi all, > >I'm new to this list and quite new to Perl. I'm on digest, so I'd >appreciate a cc.

RE: referencing and subroutines.

2001-04-17 Thread Colby DeRodeff
how do you get off this list? >From: blowther <[EMAIL PROTECTED]> >To: "'Martijn van Exel'" <[EMAIL PROTECTED]>, [EMAIL PROTECTED] >Subject: RE: referencing and subroutines. >Date: Tue, 17 Apr 2001 14:51:20 -0600 > >You could return the data b

RE: referencing and subroutines.

2001-04-17 Thread blowther
artijn van Exel [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 17, 2001 2:38 PM To: [EMAIL PROTECTED] Subject: referencing and subroutines. Hi all, I'm new to this list and quite new to Perl. I'm on digest, so I'd appreciate a cc. I have written a subroutine to parse a text file c

Re: referencing and subroutines

2001-04-17 Thread Matt Cauthorn
To get a value out of a subroutine you need to use the return function. So if your sub creates the hash and you want to do something with it in the script outside, do something like; %newhash=subroutine(values); I believe you may also simply reference the hash within the subroutine, but you shou

referencing and subroutines.

2001-04-17 Thread Martijn van Exel
Hi all, I'm new to this list and quite new to Perl. I'm on digest, so I'd appreciate a cc. I have written a subroutine to parse a text file containing a flat file database. The data ends up in a hash of hashes, say %datafile. This hash is created on the spot, looping through the data in a foreac