develooper Front page | perl.perl6.language | Postings from May 2004

Re: C style conditional statements

Thread Previous | Thread Next
From:
Juerd
Date:
May 12, 2004 11:53
Subject:
Re: C style conditional statements
Message ID:
20040512185335.GW22255@c4.convolution.nl
Luke Palmer skribis 2004-05-12 12:46 (-0600):
> Well, the IO-objects are iterators, and you use <$iter> to iterate.  It
> makes sense that <> would iterate over $*ARGV by default.

$*ARGS?

>     my $n = new IO::Socket::INET: LocalPort => 20010, Listen => 5;

I'd like to be able[1] to write

    my $n = new IO::Socket::INET :LocalPort 20010 :Listen 5;

But unfortunately, parens are not optional with :pairs.


Juerd

[1] Because I'd use something like that in other contexts. I expect that
I will not use indirect object syntax even in Perl 6 and will in reality
write:

    my $n = IO::Socket::INET.new LocalPort => 20010, Listen => 5;

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About