Re: Passing multiple mixed arguments to subs

2007-05-25 Thread Brad Baxter
On May 24, 5:36 am, [EMAIL PROTECTED] (Ben Edwards) wrote: > 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 ) > > Currently the beginning of the sub is:- > > sub remove_files_f

Re: Passing multiple mixed arguments to subs

2007-05-24 Thread Rob Dixon
Jeff Pang wrote: Paul Johnson 写道: 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 a

Re: Passing multiple mixed arguments to subs

2007-05-24 Thread Jeff Pang
Paul Johnson 写道: 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

Re: Passing multiple mixed arguments to subs

2007-05-24 Thread Paul Johnson
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

Re: Passing multiple mixed arguments to subs

2007-05-24 Thread Jeff Pang
Jeff Pang 写道: 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. Instead just pass a reference to r

Re: Passing multiple mixed arguments to subs

2007-05-24 Thread Jeff Pang
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. Instead just pass a reference to routines.like,

Re: Passing multiple mixed arguments to subs

2007-05-24 Thread Srinivas
Hi Ben, You can use shift for this. sub remove_files_from_ftp_server { my $pub_detail = shift @_; my @files = @_; Thank You, -srini Ben Edwards wrote: 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_pu

Passing multiple mixed arguments to subs

2007-05-24 Thread 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 ) Currently the beginning of the sub is:- sub remove_files_from_ftp_server { my $pub_detail = $_[0]; my $args = @_; my @fi