Brent -- I think I missed your point. I'll refer to your two code chunks as (a) and (b). Maybe you are getting at a finer point, though...
What you've said in (a) is pretty much what I hinted about Inline::Perl6 in my message. If you pass it to a Perl 6 interpreter, then it will probably use that hint to shift into Perl 5 mode (which, fortunately, is a perfectly respectable thing for a Perl 6 interpreter to do) kind of as if what you had sent it was really: #!/usr/bin/perl6 use syntax 'perl5'; ... Any Perl 5 code above your 'use 5' statement that isn't also legal Perl 6 code, though, would cause the compiler to complain. I don't see how what you've said in (b) is different from what I've said, outside the "use 6" which I think shouldn't exist, since it means nothing to Perl 5 (there is no Perl 5, version 6) and means nothing to Perl 6 (which has as its lowest version number... 6). So, the code you wrote is Perl 6 with a redundant "use 6" in it, otherwise in the same vein as what I wrote. If you pass it to a Perl 5 interpreter, it will choke. If you pass it to a Perl 6 interpreter, life is peachy keen. If you pass it to a Python interpreter, you get what you deserve :) You have used "use syntax" which falls under the category of "# or whatever" in my message. Regards, -- Gregor On Wed, 2004-04-14 at 18:51, Brent 'Dax' Royal-Gordon wrote: > Gregor N. Purdy wrote: > > > #!/usr/bin/perl6 > > > > ... # Perl 6 stuff here > > > > use 5; # or, whatever > > > > # Perl 5 stuff here > > > > no 5; # or, whatever > > > > # More Perl 6 stuff here > > > > use python; # you get the idea > > Why conflate the two at all? Perl 5 has two separate syntaxes for > forcing a version and embedding code in a different language: > > use 5; # forces Perl < 6 > perl_five_code(); > use Inline::Perl6 q{ # Ah, the wonders of ponie... > perl_six_code(); > }; > use Inline::Python q{ > python_code() > }; > > So why not do the same (albeit in a much slicker way) for Perl 6? > > use 6; # forces Perl 6+ > perl_six_code(); > > { > use syntax 'perl5'; # switches to Perl 5 syntax > perl_five_code(); > } > > { > use syntax 'python'; > python_code() > } #With the indentation, I think this closes both the Perl and > # the Python block... -- Gregor Purdy [EMAIL PROTECTED] Focus Research, Inc. http://www.focusresearch.com/