taint has asked for the wisdom of the Perl Monks concerning the following question:
This much returns the anticipated/expected results. However,#!/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<br />$dir"; }
#!/usr/bin/perl -Tw use perl::always; my $perl_version = "5.12.4"; print $perl_version;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Temporary file management in Perl -- is it possible?
by kennethk (Abbot) on Apr 24, 2013 at 20:23 UTC | |
|
Re: Temporary file management in Perl -- is it possible?
by mbethke (Hermit) on Apr 24, 2013 at 21:15 UTC | |
by taint (Chaplain) on Apr 24, 2013 at 23:43 UTC | |
by kennethk (Abbot) on Apr 25, 2013 at 14:48 UTC | |
by taint (Chaplain) on Apr 25, 2013 at 17:29 UTC | |
|
Re: Temporary file management in Perl -- is it possible?
by rnewsham (Curate) on Apr 24, 2013 at 20:59 UTC | |
|
Re: Temporary file management in Perl -- is it possible?
by pvaldes (Chaplain) on Apr 24, 2013 at 21:08 UTC |