mjd-perl-pm on Sat, 12 Oct 2002 22:31:23 -0400


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: for my ...


> I also under the impression that for and foreach are interchangeable, 
> though I can't be 100% sure.
> 

'for' and 'foreach' are 100% interchangeable.  Here's the code from
Perl's scanner, toke.c, that handles them:

	case KEY_for:
	case KEY_foreach:
	    yylval.ival = CopLINE(PL_curcop);
            ...

(Around line 4328 in 5.6.1.)

**Majordomo list services provided by PANIX <URL:http://www.panix.com>**
**To Unsubscribe, send "unsubscribe phl" to majordomo@lists.pm.org**


  • References: