Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: parse problem with subroutines?: msg#00173

lang.perl.perl6.compiler

Subject: Re: parse problem with subroutines?

On Tue, May 31, 2005 at 08:05:04AM -0500, david d zuhn wrote:
> If this is indeed a statement that all function calls, especially
> the ordinary sort that are used most often, must be of the form "a(b)"
> rather than allowing "a (b)", this is a pretty fundamental change in
> perl that ought to be made a bit clearer

It's not just function calls. Arrays and hashes require no whitespace
between the name and the subscript unless you use the dot form.

@a[0] # ok
@a.[0] # ok
@a [0] # WRONG
@a .[0] # ok
%h{'k'} # ok
%h.{'k'} # ok
%h {'k'} # WRONG
%h .{'k'} # ok
%h<k> # ok
%h.<k> # ok
%h <k> # WRONG
%h .<k> # ok

Also note that the dot follows the subscript so that the following are
also incorrect:

foo. () # WRONG
@a. [0] # WRONG
%h. {'k'} # WRONG
%h. <k> # WRONG

Unless I'm completely mistaken, in which case someone had better
correct me :-)

> (it's not in the p5->p6 porting guide, for example).

I didn't really realize that there was a p5->p6 porting guide until I
saw this. I'll add something to the guide as above (plus subs).

-Scott
--
Jonathan Scott Duff
duff@xxxxxxxxx



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qnx.openqnx.dev...    gcc.libstdc++.c...    solaris.opensol...    information-ret...    misc.misterhous...    web.catalyst.ge...    apache.webservi...    redhat.release....    hardware.lirc/2...    kernel.autofs/2...    technology.sust...    linux.vdr/2003-...    editors.lyx.gen...    org.user-groups...    netbsd.devel.pk...    xdg.devel/2004-...    version-control...    jakarta.slide.d...    debian.packages...    creativecommons...    ports.ppc.embed...    bug-tracking.bu...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe