Mirror program...

Hello,

i ma sorry if it's not the best place to make this question, but i've a 
problem that is driving me mad...

I've to write a really short program in Perl that mirrors a Web site.

The flow is quite simple:

sub Visit()
{
  * Get the firse page 
  * Get the list of all links
  * Visit() all the non-yet-visited pages
}

I didn't write here all the controls, but it's a simle recoursive 
algorithm.

BUT.

The point is that if I find a link, i DON'T KNOW if it's a directory of a 
file.
This is what i mean:

<A HREF="/dir1/dir2/file.html>   
Ok, it's easy...

<A HREF="/dir1/README">      
Hummmm... and now? Did I ask for a file  called "README" in a directory 
called "dir1", or did I ask for the file "index.html" in the  directory 
"dir1/README"?

The browser solves the problem, just because it's aqble to understand - i 
don't know how - if the link is a directory or a file, 'cause when you 
click on a relative link he find the good reference... but...

Who can *please* help me?

Ok... sorry if i bored you... :-)

Merc.

Received on Monday, 14 July 1997 13:42:33 UTC