Jeff Pan wrote:
my (%hash,@array);
sub_test(\%hash,[EMAIL PROTECTED]);
has special meaning so it should be dropped when not needing
particular special behavior.
I can't understand for this,can u give me some examples?
perldoc perlsub
--
NAME(LIST); # Circumvent prototypes.
How do you name subroutine reference parameter in perl?
Naming a local or pass by value is by simply using my ($param1, $param2) =
@_ ;
How about by reference? I think it would be harder if I'll be using $_[0],
$_[1] direct method.
Is it possible?
Thanks.
--
To unsubscribe, e-mail: [EMAIL
On Tue, 6 Sep 2005 16:12:35 +0800, Jayvee Vibar [EMAIL PROTECTED]
said:
How do you name subroutine reference parameter in perl?
Naming a local or pass by value is by simply using my ($param1, $param2)
=
@_ ;
How about by reference? I think it would be harder if I'll be using
$_[0],
$_[1]
On 9/6/05, Jayvee Vibar [EMAIL PROTECTED] wrote:
How do you name subroutine reference parameter in perl?
Naming a local or pass by value is by simply using my ($param1, $param2) =
@_ ;
How about by reference? I think it would be harder if I'll be using $_[0],
$_[1] direct method.
Is it
Jeff Pan wrote:
Passing reference as parameter to subroutine is as easy as the normal
way.And,if u pass some types of parameter such as hash,array,or handle
to subroutine,using reference instead is more safer.
for example,such below code is right:
It is, however it could be better.
my
my (%hash,@array);
sub_test(\%hash,[EMAIL PROTECTED]);
has special meaning so it should be dropped when not needing
particular special behavior.
I can't understand for this,can u give me some examples?
my %hash=%$hash_ref;
my @[EMAIL PROTECTED];
This isn't needed actually and