Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Re: Re: Need cleaner way to read @_ when dereferencing

by dragonchild (Archbishop)
on Jan 14, 2004 at 17:44 UTC ( [id://321320]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Need cleaner way to read @_ when dereferencing
in thread Need cleaner way to read @_ when dereferencing

If you want to edit and not have those changes reflected, yes. However, when using the \@ prototype, my experience is that you usually want to have your changes reflected in the array when you're done. In fact, most examples in the docs regarding prototypes and arrays involve things like my_push() and my_pop(), which do change their parameters. YMMV

------
We are the carpenters and bricklayers of the Information Age.

Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

  • Comment on Re: Re: Re: Need cleaner way to read @_ when dereferencing

Replies are listed 'Best First'.
Re: Re: Re: Re: Need cleaner way to read @_ when dereferencing
by welchavw (Pilgrim) on Jan 15, 2004 at 03:28 UTC

    This is an excellent point and well put. However, 2 arrays *are* being passed in the example, which is the other important usage of array-prototypes that comes to mind. But, anyway, I dislike prototypes and would just like to see a ref passed in the first place, but that's just me.

    ,welchavw

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://321320]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-24 05:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found