use Spreadsheet::Read; #use only for simply excel files # take the filename from commandline and try to take in the excel file my $file1 = ReadData ($excelfile); # obtain the last line on the first sheet my $max_row1 = $file1->[1]{maxrow}; # loop through the rows for (my $i; $i <= $max_row1; $i++) { # read the name on the cell A $i my $name = $file1->[1]{cr2cell ( 1, $i)}; # read the file on the cell B $i my $file = $file1->[1]{cr2cell ( 2, $i)}; }