|
|
Choosing A Webhost: |
Re: parse problem with subroutines?: msg#00173lang.perl.perl6.compiler
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> |
|---|---|---|
| Previous by Date: | Re: date and time formatting, Rob Kinyon |
|---|---|
| Next by Date: | Re: parse problem with subroutines?, Carl Franks |
| Previous by Thread: | Re: parse problem with subroutines?, Carl Franks |
| Next by Thread: | Re: parse problem with subroutines?, Carl Franks |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive 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 |