in reply to Weird eval behavior...

Are you sure it's trying to eval what you think it's trying to eval? Replace 'eval' with 'print' (or better yet, since you're looping, do print "$sub\n"; so you can actually read it). Perhaps that will shed some light on it...

"One word of warning: if you meet a bunch of Perl programmers on the bus or something, don't look them in the eye. They've been known to try to convert the young into Perl monks." - Frank Willison