I using perl v5.8.4 on a HPUX platform, i have a script that needs to be able to determine if a file is for today or not.
My thought was to use the file test operators in perl, so i did a small test script posting the file and various test operators.
My problem is that every file has the same test results.
foreach my $logfile ( <./report*> )
{
chomp($logfile);
chomp(my @ll = `ll $logfile`);
print "\n\n--------------------------------\n@ll\n";
printf ("%22s %7.2f %7.2f %7.2f %7.2f %7.2f %7.2f\n", $logfile, -M
+ _, -A _, -C _, -r _, -w _, -O _);
}
file test returns the same for all files.
----------------------------------------------------------
-rw-rw-r-- 1 not_me mygroup 50555 Mar 25 16:44 ./report.txt
./report.txt 0.99 0.00 0.99 1.00 1.00 1.00
----------------------------------------------------------
-rw-rw-r-- 1 me mygroup 38322 Oct 22 19:34 ./report.txt.
+bak
./report.txt.bak 0.99 0.00 0.99 1.00 1.00 1.00
----------------------------------------------------------
-rw-rw-r-- 1 me mygroup 38322 Oct 22 19:34 ./report.txt.
+sav
./report.txt.sav 0.99 0.00 0.99 1.00 1.00 1.00
----------------------------------------------------------
-rw-r--r-- 1 not_me mygroup 38322 Oct 22 19:09 ./report.txts
+av
./report.txtsav 0.99 0.00 0.99 1.00 1.00 1.00
----------------------------------------------------------
-rw------- 1 not_me mygroup 38322 Oct 22 19:09 ./report.txts
+av2
./report.txtsav2 0.99 0.00 0.99 1.00 1.00 1.00
----------------------------------------------------------
-rw-rw-r-- 1 me mygroup 41397 Jul 31 2014 ./report_7_30
+.txt
./report_7_30.txt 0.99 0.00 0.99 1.00 1.00 1.00
Any Ideas why this is happening?