Re: naming subroutine reference parameter?

2005-09-07 Thread matija
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.

naming subroutine reference parameter?

2005-09-06 Thread Jayvee Vibar
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

Re: naming subroutine reference parameter?

2005-09-06 Thread Jeff Pan
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]

Re: naming subroutine reference parameter?

2005-09-06 Thread Dave Gray
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

Re: naming subroutine reference parameter?

2005-09-06 Thread Matija Papec
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

Re: naming subroutine reference parameter?

2005-09-06 Thread Jeff Pan
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