SPUG: Variable in subroutines to check number of args?

Dan Ebert mathin at mathin.com
Wed Jul 12 14:05:05 PDT 2006


I don't know if there is a variable, but couldn't you just do "scalar @_"
(before @_ is modified by any shifts, etc.?

Dan.
----------------------------------------------------------
Immigration is the sincerest form of flattery.
	- Unknown
----------------------------------------------------------


On Wed, 12 Jul 2006, John Costello wrote:

>
> Is there a variable available within subroutines that tells how many
> arguments were passed to the subroutine?  I haven't found such a var
> through web searches or browsing my perlcd3.
>
> Thanks,
>
> John
>
>
> _____________________________________________________________
> Seattle Perl Users Group Mailing List
>      POST TO: spug-list at pm.org
> SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list
>     MEETINGS: 3rd Tuesdays
>     WEB PAGE: http://seattleperl.org/
>



More information about the spug-list mailing list