#!/usr/bin/perl -wT # testing with a web browser print "Content-type: text/html\n\n"; use strict; use POSIX qw(strftime); my $gmtstring = strftime "%H-%I-%S", localtime; my $filehandle = "relative/path/to/filename"; my $dir = "." if (-r $filehandle) { $filehandle = "readable"; }else{ $filehandle = "unreadable"; } if (-w $dir) { $dir = "writable"; }else{ $dir = "unwritable"; } unless ($filehandle && $dir) { symlink("$filehandle", "$gmtstring-$filehandle") }else{ print "$filehandle
$dir"; }