"R. Joseph Newton" wrote:
> 
> Lance wrote:
> 
> > If I hafta pass in refs from loop1 2 and 3 all the way down the line, So Be
> > It.  It just makes my argument list a little unsightly, is all.
> 
> You might want to re-examine this view.  The process of passing by reference
> is not something to just resign yourself to.  It is the key to powerful
> programming.  As long as your code depends on external values, such as global
> variables, you will be limited in the scale of operations you can handle.
> 
> I don't particularly enjoy the way Perl handles references.  I prefer the C++
> feature which allows one to simply declare a parameter as a reference, and use
> it afterwards trrasnsparently--as if it was the original.  Nevertheless, with
> a little efort, you can get the Perl reference paradigm down, and it does have
> an internal consistency, at least.

You can get the same sort of thing in perl if you use prototypes, for
example:

sub example (\@\%) {
    my ( $array_ref, $hash_ref ) = @_;
    # do something with @$array_ref and %$hash_ref
    }

# using example converts arguments to references
example( @array, %hash );


perldoc perlsub



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to