[Buffalo-pm] Question: How to iterate through 2 arrays and merge columns
Shankar, Ganesh
Ganesh.Shankar at RoswellPark.org
Fri Jul 8 05:59:06 PDT 2005
That was it! Thanks. I'm still getting the uninitialized value warning,
but the script works. I'm moving on, but I'll keep trying to figure out
the warning.
Thanks, again.
-Ganesh
-----Original Message-----
From: Jim Brandt [mailto:cbrandt at buffalo.edu]
Sent: Thursday, July 07, 2005 7:50 AM
To: Shankar, Ganesh
Cc: buffalo-pm at pm.org
Subject: Re: [Buffalo-pm] Question: How to iterate through 2 arrays and
merge columns
You still have commas in here, so it's not creating one big string.
You need to convert all of the commas to periods, including the ones
after the "\t". If you fix that, I think you should be all set.
As far as your 'our' problems, here's the snippet from the docs:
An "our" declares the listed variables to be valid globals
within the enclosing block, file, or "eval". That
is, it has
the same scoping rules as a "my" declaration, but
does not cre-
ate a local variable.
The trick is "within the enclosing block," which in your case was the
'for' loop. In general, most normal programs never need 'our'. You
should just just 'my', and watch out for the scoping issue you ran into.
On Jul 7, 2005, at 5:48 AM, Shankar, Ganesh wrote:
> push( @red_elements,
> $red_items[6]. "\t", $red_items[7]."\t",
> $red_items[8]. "\t", $red_items[9]. "\t"
> );
==========================================
Jim Brandt
Administrative Computing Services
University at Buffalo
This email message may contain legally privileged and/or confidential information. If you are not the intended recipient(s), or the employee or agent responsible for the delivery of this message to the intended recipient(s), you are hereby notified that any disclosure, copying, distribution, or use of this email message is prohibited. If you have received this message in error, please notify the sender immediately by e-mail and delete this email message from your computer. Thank you.
More information about the Buffalo-pm
mailing list