Ashutosh Jog wrote:
>
> Hello,
Hello,
> This might be a very simple question, but being a newbie I have to ask.
> :)
>
> How can I copy the line by line contents of a file to a array?
>
> For eg: @animals should look like
> @animals = ('tiger','lion','elephant');
>
> And the text file would have entries for the same in this order (i.e.
> one after the other):
>
> tiger
> lion
> elephant
You could use the Tie::File module.
use Tie::File;
tie @animals, 'Tie::File', 'filename' or die ...;
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]