On 6/16/05, Steve Peters <[EMAIL PROTECTED]> wrote: > --- op.c.old Mon Jun 13 11:52:00 2005 > +++ op.c Thu Jun 16 13:53:26 2005 > @@ -3901,6 +3901,10 @@ > I32 iterflags = 0; > I32 iterpflags = 0; > > + if (!expr) { > + DIE(aTHX_ "\"for\" missing a conditional expression");
Surely you jest. for is used quite often to alias a variable to $_, i.e. without a conditional expression. However you correctly found the cause of the problem. $[ is a pragmatic variable and assignment to it happens at compile time and is optimized away. So expr becomes NULL. Note that other kinds of similar code segfaults too : $ perl -e 'if($[=0){print}' Segmentation fault I'd rather solve all those cases once and for all.