Equal in if statement not working as expected
use Text::Diff; my $count; our $stats2 = 0; for ($count = 0; $count <= 1000; $count++){ my $data_dir = "archive/oswiostat/oracleapps.*dat"; my $data_file = `ls -t $data_dir | head -1`; chomp($data_file); while (defined($data_file)){ print $data_file; open (DAT, $data_file) || die("Could not open file! $!"); my @stats1 = stat $data_file; my @raw_data = <DAT>; close(DAT); print "Stats1 is :$stats1[9]\n"; sleep(5); print "Checking $stats1[9] equals $stats2\n"; if (chomp($stats1[9]) != chomp($stats2)) { print "I am here"; my @diff = diff \@raw_data, $data_file, { STYLE => "Context" }; print @diff
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.