Jeff Pang wrote:
I also think this is the best way for your purpose.You can pass a
hash ref to subroutine,and store any arguments you want to be past
> to the subroutine in that hash.
> ...
Thanks for this. I'm going to do this, I think you're right it seems to
fit what I need.
Mug wrote:
>
>
>I thought about using a hash instead of a list of variables.
>
>
>example_sub (
> {
> some_scalar => $some_scalar,
> some_hash_ref => $some_hash_ref,
> some_string => 'some string',
> }
>);
>
>So I could add to it any way I wanted and write
Nigel Peck wrote:
>
> Hi all,
>
> I'm hoping to get some ideas on how to write my subs, specifically on
> passing variables into them and how best to do it.
>
> Currently I do this:
>
>
> example_sub ( $some_scalar, $some_hash_ref, 'some string' );
>
> sub example_sub {
> my ( $passed_scalar, $pass
Hi all,
I'm hoping to get some ideas on how to write my subs, specifically on
passing variables into them and how best to do it.
Currently I do this:
example_sub ( $some_scalar, $some_hash_ref, 'some string' );
sub example_sub {
my ( $passed_scalar, $passed_hash_ref, $passed_string