in reply to Re4: Finding part of a file
in thread Finding part of a file

Yep, there's a reason I didn't include warnings in my code snippet :) Going to have to read up on eval vs die and figure out why eval is overkill in this case...

Interestingly enough, I can goto outside of an eval block without any complaints:

#!/usr/bin/perl use strict; use warnings; my $begin='banana'; my $end='grape'; while(<DATA>) { /$begin/ ? eval { /$end/ ? goto END : print while (<DATA>) } : next } END: exit; __DATA__ apple banana pear peach grape orange
...re your update - that's a neat trick that I'll have to tuck away.

blyman