Re: Passing an array to a subroutine

2003-06-25 Thread John W. Krahn
Dermot Paikkos wrote: > > Hi gurus, Hello, > I have a script that is causing me some trouble. I haven't pasted the whole script > here > as it is a bit long and I can't submit any test data. > > Basically the script copies and renames file. At the end I would like to print out a > report of al

Re: Passing an array to a subroutine

2003-06-25 Thread Jenda Krynicky
From: "Dermot Paikkos" <[EMAIL PROTECTED]> > At the start I glob a directory for tif files and these are added to > the @tiffs array. Later a subroutine loops through the array and > prints the file names into the user's log. However I only get the > first file name from the file glob, all the othe

Passing an array to a subroutine

2003-06-25 Thread Dermot Paikkos
Hi gurus, I have a script that is causing me some trouble. I haven't pasted the whole script here as it is a bit long and I can't submit any test data. Basically the script copies and renames file. At the end I would like to print out a report of all the files it has renamed. These reports ar

Re: Passing an array to a subroutine

2003-02-11 Thread John W. Krahn
Colin Johnstone wrote: > > Gidday All, Hello, > A couple of you helped me with this before but I have misplaced my notes I am > trying to pass an array to a subroutine and am having trouble. > > As i am passing other variables as well I know I need to pass it by reference. > Am I doing it corre

RE: Passing an array to a subroutine

2003-02-11 Thread Hanson, Rob
Rob -Original Message- From: Johnstone, Colin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 11, 2003 4:40 PM To: '[EMAIL PROTECTED]' Subject: Passing an array to a subroutine Gidday All, A couple of you helped me with this before but I have misplaced my notes I am trying to

Passing an array to a subroutine

2003-02-11 Thread Johnstone, Colin
Gidday All, A couple of you helped me with this before but I have misplaced my notes I am trying to pass an array to a subroutine and am having trouble. As i am passing other variables as well I know I need to pass it by reference. Am I doing it correctly. $pageContent = format_indexPage( \

RE: Passing an array to a subroutine

2002-11-26 Thread Johnstone, Colin
Thank you Wiggins, and thankyou also for your help with scoping yesterday. Colin -Original Message- From: Wiggins d'Anconia [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 27, 2002 13:08 To: Johnstone, Colin Cc: '[EMAIL PROTECTED]' Subject: Re: Passing an array

RE: Passing an array to a subroutine

2002-11-26 Thread Toby Stuart
> -Original Message- > From: Johnstone, Colin [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, November 27, 2002 2:31 PM > To: '[EMAIL PROTECTED]' > Subject: Passing an array to a subroutine > > > Hi all, > > I think somebody asked this the other

Re: Passing an array to a subroutine

2002-11-26 Thread Wiggins d'Anconia
If it is just an array and nothing else gets passed, then you can pass it normally... my $return = passArrayToMe(@array) and your definition will go something like this: sub passArrayToMe { my @array = @_; } but if you need to pass other variables as well then you will need to pass an array

Passing an array to a subroutine

2002-11-26 Thread Johnstone, Colin
Hi all, I think somebody asked this the other day. How does one pass an array to a subroutine please Colin Johnstone