ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> activeperl
activeperl
Perl Prototypes
by Francisco Zarabozo other posts by this author
Mar 22 2008 8:43AM messages near this date
Re: Character encoding issues | Re: Perl Prototypes
Hello All,

After reading a lot on the subject, I'm guessing that it's not possible to 
do what I want to do, but anyway I wanted to ask you about and hopefuly be 
wrong. :-)

I want to write a sub so I can use it like this:

--------------------------------
mysub (a =>  1, b => 2, c => 3) {
   # ...CODE...
};
--------------------------------

But, I haven't found any valid prototype combination to make that work. 
After reading the perlsub documentation, at first I thought I would be able 
to do so like this:

--------------------------------
sub mysyb (\%&) {
   # ...CODE...
}
--------------------------------

But, of course, I was wrong. Taking out the backslash is also wrong since 
the % will eat anything after it.


Please let me know if any of you know the way to correctly construct such 
prototype.

Thanks in advance.


Cheers, :-)

Paco



_______________________________________________
ActivePerl mailing list
ActivePerl@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Francisco Zarabozo
Ingo Schwarze
Mike Gillis
Francisco Zarabozo
Foo JH
Francisco Zarabozo
Williamawalters

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved