in reply to Control Flow Puzzle

Would a test for eof() be helpful here:
while (<INFO>) { last if /^\* Menu:/; return %header if /^\037/ or eof(INFO); }


$_="goto+F.print+chop;\n=yhpaj";F1:eval

Replies are listed 'Best First'.
Re: Control Flow Puzzle
by Dominus (Parson) on Nov 16, 2000 at 02:46 UTC
    Yes, that does look good. Thanks!

    In the article I complained bitterly about eof() and strongly advised staying away from it. But it looks like this is one of the few times when eof() is the Right Thing.

    I guess I was just being too doctrinaire. Well, that'll give me something interesting to say in the followup article.