>>>>> "LW" == Larry Wall <[EMAIL PROTECTED]> writes:
LW> 1c) Explicit parentheses may delimit the actual arguments,
LW> in which case the function is parsed as a function rather
LW> than a list operator. Adverbs may follow the parens:
LW> splurt(1,2,3):by{ +$_ } # okay
LW> splurt(1,2,3):{ +$_ } # okay (implicit binding to *& param)
LW> splurt 1,2,3 # okay (assumed to be list operator)
LW> splurt; # okay, 0-arg list
LW> splurt() + 1 # okay, explicit 0 arg list
LW> splurt + 1 # wrong unless predeclared 0-ary
can you have a 0- or 1-ary function? meaning like the many funcs that
work on $_ with no args or the single arg you pass in. how do you
declare it so it parses correctly?
splurt # should work on $_
splurt() # should work on $_
splurt + 1 # same??
splurt +1 # work on +1??
splurt( +1 ) # definitely work on +1
uri
--
Uri Guttman ------ [EMAIL PROTECTED] -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org