#!/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!
In reply to Re: What is $#_ ?
by rob_au
in thread What is $#_ ?
by Mandor
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |