it's the way the web server setup the apache settings and file/directory structure settings
this is how most web hosting service setup their server so they can used shared space for all their clients...
i tried going to the links you posted (login.html), and based on your note, the directory structures are different depending on how you view it
so, basically everything that you put under /var/www, will be seen as the root directory (instead of
http://www.bandtank.com/var/www/) for people looking through the web browser... /var/www is only visible when you get there directly.
you may have to try figuring how your pathtest.pl relate to your /var/www directory
it's better to use relative path than absolute path
i don't know how it is in your server setting, but here's an example on my webhost (iicinternet):
i have $home/domaincgi/script.pl and $home/myOwnDirectory/somefile.txt
i also have $home/www/index.html (and people will just see it as website.com/index.html, without the www)
inside my script, if i want to access index.html, i will use "index.html" instead of "../index.html".
however, if i want to access "somefile.txt", i use "../myOwnDirectory/somefile.txt" instead of "somefile.txt"
why? i have no idea... but that's how they setup the web server to see the other files...
so, to answer your question, the way your scripts can see the files in other directories depends on which file you're looking for (whether it's inside separate directory or under your www directory), as well as how your webhost server is set up...
probably not the best explanation you can get, but .... that's all i can think of for now ...