> "DB" == Dan Boger <[EMAIL PROTECTED]> writes:
DB> This code was just written to see how things work. I find that
DB> understanding these kind of edge cases helps overall.
In this case, I think you've stumbled across a known bug, so while it
does reveal some implementation details of
From: Dan Boger <[EMAIL PROTECTED]>
Date: Wed, 10 Jan 2007 14:06:04 -0500
On Wed, Jan 10, 2007 at 01:14:43PM -0500, Uri Guttman wrote:
> > "DB" == Dan Boger <[EMAIL PROTECTED]> writes:
>
> DB> @headers = ("header 1","header 2","header 3");
> DB> @body = ("body A",
> @headers = ("header 1","header 2","header 3");
> @body = ("body A","body B","body C");
> foreach (@headers,"",@body) {
>@body = ();
>push @headers,"header ".$h++;
>
Ouch. Bad programmer.
No biscuit!
___
Boston-
On Wed, Jan 10, 2007 at 01:14:43PM -0500, Uri Guttman wrote:
> > "DB" == Dan Boger <[EMAIL PROTECTED]> writes:
>
> DB> @headers = ("header 1","header 2","header 3");
> DB> @body = ("body A","body B","body C");
> DB> $h = 4;
> DB> foreach (@headers,"",@body) {
>
> the list of a
> "DB" == Dan Boger <[EMAIL PROTECTED]> writes:
DB> @headers = ("header 1","header 2","header 3");
DB> @body = ("body A","body B","body C");
DB> $h = 4;
DB> foreach (@headers,"",@body) {
the list of aliases is created there. it can't be changed by clearing
@body. the aliases r
I was talking to a friend about foreach aliasing the loop variable one
by one through the list provided... As he was playing around with it,
came across this:
use Data::Dumper;
@headers = ("header 1","header 2","header 3");
@body = ("body A","body B","body C");
$h = 4;
foreach (@headers
6 matches
Mail list logo