|
|
| No such thing as a small change | |
| PerlMonks |
Abs directory turned into linksby einerwitzen (Sexton) |
| on Feb 07, 2002 at 00:54 UTC ( [id://143800]=perlquestion: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.einerwitzen has asked for the wisdom of the Perl Monks concerning the following question:
On one perl page that prints out links to itself with ?variable=value on them so it prints out new info. This value is a directory name. The info is the contents of the directory. So I can go to this file and click links to view the contents of other directories. At the top of this multi-tasking perl page is a printed out line of what directory on the server I am viewing, this is printed out from a hard set variable and the sent value. I want to be able to use this printed out line to have each directory name turned into a link that links again to this same file but with the new value. its a bit like this:
So when I click on the linked part it takes me to view the contents of that directory. Simple. This works fine when I am in "/html" and $dire is "/html" But not when I am in "/html/code" and $dire is "/html/code". When it is this case and it prints out home/client/www/site/html/code I want to be able to click on the "html" part of that line and have it take me to "./index.cgi?dire=/html" or to click the "code" part of that line and have it take me to "./index.cgi?dire=/html/code" You get the idea, i want to be able to move back directories. How can I split up $dire and print it out as separate links? Thank you for any help or pointers. I tried my best to describe the problem but if it's not clear let me know!
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||