
fridge
Novice
Feb 28, 2003, 7:41 PM
Post #1 of 4
(535 views)
|
|
[mad]need help.....
|
Can't Post
|
|
can anyon help? i need a perl script that tests to see if a file exists (getting the file name from the question mark after the address)and if it does, printing some html, and if it doesnt, print some different html. ive tried everything abd CANT GET IT TO WORK i also need to incorporate th efollowin gbit of code in it, which only allows certain characters, and gets rid of the / on the ent of the file name (if there is one) and puts one at the start (if there isnt one):
$Path = '' if ($Path !~m/^[a-zA-Z0-9 \-\_\/\.\!]*$/); $Path = '' if ($Path =~ m/\.\./); chop $Path if ($Path =~ m/\/$/); $Path = '/' . $Path if ($Path !~ m/^\//); If anyone can help, id be realy happy
|