#!/usr/bin/perl use strict; use Spreadsheet::XLSX; my $excel = Spreadsheet::XLSX -> new ('build.xlsx'); my $sheet = $excel->Worksheet('Sheet1'); my ($row_min,$row_max) = $sheet->row_range(); my @col=(); for my $row ($row_min..$row_max){ $col[0] = $sheet->{Cells}[$row][0]->{Val}; $col[3] = $sheet->{Cells}[$row][3]->{Val}; #print "$row $col[0] $col[3] \n" #print "$col[0] $col[3] \n" foreach ($col[0]) { if ($col[0] eq $col[3]) { open FILE, ">feckyou.txt" or die $!; print FILE "price has changed for $row \n"; close FILE; } } }