in reply to Re^6: Parrot Monks? (one ring)
in thread Parrot Monks?
vs5; print "I'm Perl 5 code\n";
Or if you want to make sure strictness is on, you use6; say "I'm Perl 6 code";
oruse 6.0;
Those are okay for the script as a whole, but I hate to think about what happens when people start cutting and pasting snippets. Certainly Perl 6 could disallow snippets starting with "5;", but Perl 5 would currently accept a "6;" unless you had warnings turned on. One could go with "5:" and "6:" instead, but that's a syntax error in Perl 5 currently.module;
Of course, there's always the tried and true:
vsprint "I'm Perl 5 code\n"; # Perl 5
But that doesn't help much with cut-and-paste errors...say "I'm Perl 6 code"; # Perl 6
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Parrot Monks? (one ring)
by tye (Sage) on Jan 10, 2005 at 18:44 UTC |