On Thu, May 24, 2007 at 05:55:13PM +0800, Jeff Pang wrote:
> Ben Edwards 写道:
> >I am passing a reference to a hash ($publisher) and a array with an
> >unknown number of elements (@files).  So the call is
> >
> >delete_from_publishers( $publisher, @files )
> >
> 
> mnnn,don't pass an original array to a subroutine at anytime.

What, never?

http://pjcj-sings-opera.org/HMS-Pinafore.mp3

> Instead just pass a reference to routines.like,
> 
> delete_from_publishers($publisher,[EMAIL PROTECTED]);
> 
> then in the subroutine,
> 
> my $hash_ref = shift;
> my $array_ref = shift;
> 
> This would make things more clear.

Or perhaps not.

my ($publisher, @files) = @_;

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to