Perl: Reading data from other file

Hi, I am writting some perl scripts for daily backup process. In which I want to pass some data/referance from another txt file. Text file contains only one column and multiple rows. I want to pass this data to variables of another perl script.

e.g.
Refdoc.txt file contains data as:
perl1
perl2
perl3
perl4

Now I want to assign this data to another perl script to a variales as:
$var1 = 'perl1'
$var2 = 'perl2'
$var3 = 'perl3'
$var4 = 'perl4'

How can achieve this task in perl?

Waiting for reply.

Regards

Use the following code

open FH,"< Refdoc.txt" or die "Can't open file : $!\n";
my @array = <FH>;

for (my $i = 0; $i <= $#array; $i++)
{

         $var{$i} = $array[$i];
}

foreach $key (keys %var)
{
    print "$var{$key}";
}


You could actually use an array for this kind of stuff...

$a= 0;
while(<DATA>)  {
        $var[++$a] = $_;

        print $var[$a];
}
__DATA__
perl1
perl2
perl3
perl4

thanks thillai, it worked and solved my problem
thanks again..