David Cantrell writes: > A few days ago I briefly discussed with Nicholas Clark (current perl 5.8 > pumpking) about making perl5 code forward-compatible with perl6. A > quick look through the mailing list archives didn't turn up anything > obvious, and I don't recall any mechanism being presented in any of the > Apocalypses, so ...
Well, there is one, as far as I understand it. Your "use perl5;" is spelled "package". That is, perl will assume Perl 6 unless it sees "package SomethingOrOther;" (since Perl 6 calls them "module"s). So, to force Perl 5 interpretation, use: package main; Luke