in reply to Assignment to @INC in BEGIN block gives puzzling results

The problem is not with @INC but with "BEGIN" versus "LABEL:" : </c>

perl -le "BEGIN: { print 'LABEL: block' }; BEGIN{ print 'BEGIN block'} + "

Perl sees your BEGIN: and interprets it as a label - you sure meant it as that because you followed it with a colon (:)...

Replies are listed 'Best First'.
Re^2: Assignment to @INC in BEGIN block gives puzzling results
by jkeenan1 (Deacon) on Dec 23, 2006 at 17:43 UTC
    Ah! The damage a single misplaced character can cause!

    Thanks, corion!

    Jim Keenan