in reply to Re: Re: Learning Exercise
in thread Learning Exercise
$_ 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
|
|---|