CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Using Request_URI

 



BenSeb
Deleted

Nov 7, 2000, 4:40 AM

Post #1 of 2 (543 views)
Using Request_URI Can't Post

Hi!!

As part of a common header and footer file I am writing, I need to be able to find what directory I am currently in. I will then use some if statements to display the correct navigational elements (i.e turn grpahics on or off)..

I am trying to use $env{REQUEST_URI} but this spits out

/directory/subdir/page.ext for example

All my pages are only 1 level deep (i.e no subdirs) and I only need to extract the "directory" part.

How can I do this? Please help!!

Cheers!!

Ben


sleuth
Enthusiast / Moderator

Nov 6, 2000, 10:52 PM

Post #2 of 2 (543 views)
Re: Using Request_URI [In reply to] Can't Post

 
Well if your sure it's only one level deep you can use slpit();

($one, $two, $three)=spit(/\//, $env{REQUEST_URL});

Sleuth

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives