Re: Does =$*ARGS work?
on 4/13/2007 4:55 AM brian d foy said the following: > Shouldn't $*ARGS still show up as the P6 counterpart to ARGV? > S*ARGS as the filehandle shows up in S04. Yup. Fixed now in S28draft.pod. Mention in Variable.pod will follow. dvergin
Re: Does =$*ARGS work?
In article <[EMAIL PROTECTED]>, David Vergin <[EMAIL PROTECTED]> wrote: > on 4/11/2007 10:29 AM brian d foy said the following: > > The $*ARGS variable shows up in this file, which looks like it's still > > maintained: > > http://svn.pugscode.org/pugs/docs/AES/S28draft.pod > > That's a typo (mine). It should be @*ARGS and refers to simple access to > the command line arguments. (Fixed.) Shouldn't $*ARGS still show up as the P6 counterpart to ARGV? S*ARGS as the filehandle shows up in S04.
Re: Does =$*ARGS work?
on 4/11/2007 10:29 AM brian d foy said the following: The $*ARGS variable shows up in this file, which looks like it's still maintained: http://svn.pugscode.org/pugs/docs/AES/S28draft.pod That's a typo (mine). It should be @*ARGS and refers to simple access to the command line arguments. (Fixed.) dvergin
Re: Does =$*ARGS work?
Hi, brian d foy wrote: > In article <[EMAIL PROTECTED]>, Moritz Lenz > <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> brian d foy wrote: >>> Under the section "The for Statement" in S04, it says that the diamond >>> operator >>> >>>while( <> ) { ... } >>> >>> becomes in Perl 6 >>> >>>for =$*ARGS { ... } >> Some time ago I read that too, and wondered why that's not [EMAIL PROTECTED] >> That >> seems more reasonable, because the command line arguments are stored in >> @*ARGS. > > well, $*ARGS is a magical filehandle, not a list of files. If you could > use an array there, I think you'd have to allow any array, and that > would be weird. Why would that be weird? When things like my $file = "/etc/passwd"; for =$file -> $line { ... } work, why shouldn't we allow things like my @files = for [EMAIL PROTECTED] -> $line { ... } and let '=' followed by an empty list default to $*IN (like in =<>)? I think that would be consequent magic, and very convenient. (If you already had that discussion earlier, just say it and I'll shut up ;-) Cheers, Moritz -- Moritz Lenz http://moritz.faui2k3.org/ - http://sudokugarden.de/ - http://perl-6.de/ signature.asc Description: OpenPGP digital signature
Re: Does =$*ARGS work?
In article <[EMAIL PROTECTED]>, Moritz Lenz <[EMAIL PROTECTED]> wrote: > Hi, > > brian d foy wrote: > > Under the section "The for Statement" in S04, it says that the diamond > > operator > > > >while( <> ) { ... } > > > > becomes in Perl 6 > > > >for =$*ARGS { ... } > > Some time ago I read that too, and wondered why that's not [EMAIL PROTECTED] > That > seems more reasonable, because the command line arguments are stored in > @*ARGS. well, $*ARGS is a magical filehandle, not a list of files. If you could use an array there, I think you'd have to allow any array, and that would be weird.
Re: Does =$*ARGS work?
Hi, brian d foy wrote: > Under the section "The for Statement" in S04, it says that the diamond > operator > >while( <> ) { ... } > > becomes in Perl 6 > >for =$*ARGS { ... } Some time ago I read that too, and wondered why that's not [EMAIL PROTECTED] That seems more reasonable, because the command line arguments are stored in @*ARGS. I can't answer your question, sorry ;-). Moritz -- Moritz Lenz http://moritz.faui2k3.org/ - http://sudokugarden.de/ - http://perl-6.de/ signature.asc Description: OpenPGP digital signature