RE: passing an array and a hash to a subroutine.

2002-11-21 Thread Timothy Johnson
Exactly. For those of you playing along at home, the way that you would do this is something like this: ## my @array = qw(one two three); my %hash = (first = 'Tim', last = 'Johnson', geek = 'yes'); my $scalar = This is my string.\n;

Re: passing an array and a hash to a subroutine.

2002-11-21 Thread Sudarshan Raghavan
On Thu, 21 Nov 2002, David Buddrige wrote: Hi all, I am writing a subroutine which is intended to take an array of strings, and concatenate each string in the array into a single [very long] string. The subroutine is listed below. My problem is that for some reason when I print

Re: passing an array and a hash to a subroutine.

2002-11-21 Thread John W. Krahn
David Buddrige wrote: Hi all, Hello, I want to write a subroutine that takes an array and a hash as input parameters and then does some work on them. I can't seem to determine how to do this however; it seems that with a subroutine, all you can pass is a single array ( which appears as

passing an array and a hash to a subroutine.

2002-11-20 Thread David Buddrige
Hi all, I want to write a subroutine that takes an array and a hash as input parameters and then does some work on them. I can't seem to determine how to do this however; it seems that with a subroutine, all you can pass is a single array ( which appears as @_ ) to the subroutine. The

Re: passing an array and a hash to a subroutine.

2002-11-20 Thread David Buddrige
Hi all, I am writing a subroutine which is intended to take an array of strings, and concatenate each string in the array into a single [very long] string. The subroutine is listed below. My problem is that for some reason when I print out the variable $single_comment_line, rather than

Re: passing an array and a hash to a subroutine.

2002-11-20 Thread David Buddrige
Hi all, I have figured out the solution to the problem below is to use an array of references to the various objects that I want to pass into the subroutine. thanks guys David. David Buddrige wrote: Hi all, I want to write a subroutine that takes an array and a hash as input parameters