$_ is equivalent to your $option.s/\s//; # remove all whitespace from $_ if($_ eq "l") { entry_list(); } elsif($_ eq "a") { addentry();} #etc
So there are these ways to call a subroutine (ignoring object methods):
subroutine; # doesn't pass strict. &subroutine; # passes @_ as argument list &subroutine(); # looks weird, passes arguments in () subroutine(); # generally preferred method
jarich
In reply to Re: Re: Re: Learning Exercise
by jarich
in thread Learning Exercise
by Foncé
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |