in reply to Re: syntax error - perl-5.8 only
in thread syntax error - perl-5.8 only

I've seen some weird syntax error-ish bugs around subs that are prototyped to take a sub-ref as an argument

Yes, that seems to be the trouble here.

The problem is with the run_main prototype of (;&)
If I change that to simply (&) all seems well on 5.8, except that run_main then needs to be called with at least one argument.
That is, with a prototype specification of (;&) we can simply do run_main; on perl-5.10 and 5.12, but with a prototype specification of (&) on my perl-5.8.0, we're not allowed to do simply run_main. Instead we have to do run_main sub {} which looks very much like what you were suggesting. But that only works on my perl-5.8.0 if I also change the prototype from (;&) to (&)
That's the best I've yet been able to come up with.

This may well have been fixed in later versions of perl-5.8. I haven't checked.

Sorry it took so long to reply - I was unable to access perlmonks last night (though access to every other site was fine).

Cheers,
Rob