What I want to do is scan a dir and find the file with the biggest
name ( Example 1.txt, 2.txt ), then print that to the browser.
$greatest = -1;
opendir "/data", DIR || die "no open data";
while($file = readdir DIR) {$greatest = $file if $file gt $greatest;}
closedir DIR;
print "Content-type: text/html\n\n";
open (DATA, "<$greatest") || die "poop";
@array = <DATA>;
foreach $item (@array) {print $item};
close (DATA);
In reply to Argh by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |