Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
open KERLIS, "<$lis_file"; @lis_array=<KERLIS>;
i want to write a function to which i want to pass the contents of file i had read
there are two ways , one is to pass array and other is to pass file handle.
i had tried with passing array to function but i read some where pasing array is not optimized way of working
so i thought if i can pass file handle to fucntion.
is it posible to pass file handle to function / subroutine and if yes how can i do for my case
Edit: g0n - code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: passing file handle to functions
by Samy_rio (Vicar) on May 18, 2006 at 05:53 UTC | |
|
Re: passing file handle to functions
by davorg (Chancellor) on May 18, 2006 at 07:58 UTC | |
|
Re: passing file handle to functions
by TedPride (Priest) on May 18, 2006 at 08:13 UTC | |
|
Re: passing file handle to functions
by ioannis (Abbot) on May 18, 2006 at 07:13 UTC | |
|
Re: passing file handle to functions
by UnderMine (Friar) on May 18, 2006 at 06:04 UTC | |
by davorg (Chancellor) on May 18, 2006 at 07:54 UTC | |
by UnderMine (Friar) on May 18, 2006 at 11:32 UTC | |
by japhy (Canon) on May 18, 2006 at 11:38 UTC |