Re: Subroutine interaction

2004-01-29 Thread James Edward Gray II
On Jan 29, 2004, at 2:18 AM, Jan Eden wrote: I am not sure if I could store all this in one hash: I bet you can. I'm an optimist. ;) I haven't been following this thread too closely, but let's just think about it in the general sense. What you basically has is a lot of information about spec

Re: Subroutine interaction

2004-01-29 Thread Jan Eden
James Edward Gray II wrote: >On Jan 29, 2004, at 2:18 AM, Jan Eden wrote: > >> I am not sure if I could store all this in one hash: > >I bet you can. I'm an optimist. ;) > >I haven't been following this thread too closely, but let's just think >about it in the general sense. What you basically

Re: Subroutine interaction

2004-01-29 Thread Jeff 'japhy' Pinyan
On Jan 28, Jan Eden said: >sub read_index { >my $gedicht_path = shift; >my (%author_indexlines, %author_headlines, %gedicht_lines, @author_letters, > @gedicht_letters, @alphabet_index); >find (\&read_poem, $gedicht_path); >print %author_indexlines; # nothing is printed out here!

Re: Subroutine interaction

2004-01-29 Thread Jan Eden
Rob Dixon wrote: >You need to declare the list of hashes and arrays /before/ and >/outside/ any subroutine that needs them. Like this: > >my (%author_indexlines, %author_headlines, ... ); > >sub read_index { >: >} > >sub read_poem { >: >} > That's the way I had done it before. But I thought I'd

Re: Subroutine interaction

2004-01-28 Thread R. Joseph Newton
Jan Eden wrote: > Hi all, > > the following structure does not work as intended: > > sub read_index { > > my $gedicht_path = shift; > my (%author_indexlines, %author_headlines, %gedicht_lines, @author_letters, > @gedicht_letters, @alphabet_index); > find (\&read_poem, $gedicht_path);

Re: Subroutine interaction

2004-01-28 Thread Rob Dixon
Jan Eden wrote: > > Learning more and more Just as it should be :) Well done, Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Subroutine interaction

2004-01-28 Thread Jan Eden
Jeff 'japhy' Pinyan wrote: >On Jan 28, Jan Eden said: > >>sub read_index { >>my $gedicht_path = shift; my (%author_indexlines, %author_headlines, >>%gedicht_lines, @author_letters, @gedicht_letters, @alphabet_index); >>find (\&read_poem, $gedicht_path); print %author_indexlines; # >>nothing is pr

Re: Subroutine interaction

2004-01-28 Thread Rob Dixon
Jan Eden wrote: > > the following structure does not work as intended: > > sub read_index { > > my $gedicht_path = shift; > my (%author_indexlines, %author_headlines, %gedicht_lines, @author_letters, > @gedicht_letters, @alphabet_index); > find (\&read_poem, $gedicht_path); > print