in reply to What is $#_ ?
#!/usr/bin/perl -Tw use strict; my @array = (1..5); # Pass @array to the &count subroutine and print returned result # print "There are ", &count(@array), " elements in \@array.\n"; sub count { # The arguments are passed to &count and are in @_ # return $#_ + 1; };
Ooohhh, Rob no beer function well without!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: What is $#_ ?
by davorg (Chancellor) on Nov 16, 2001 at 14:07 UTC |