I'm setting up the URL structure for my next website. I'd love to know what you guys think is the best way to analyze the URL in perl in order to generate the resultant page correctly. The URL structure only has 2 variants:
/page-name.html /page-name/1/2.html "page-name" represents the name of the page with each space in the name becoming a dash (there could be several words), and either 0 or 2 numbers appear after the page name, separated by slashes as above. How would you analyze the URL to determine the page name, whether there are 0 or 2 numbers included, and what those numbers are if they are included? It would also be great to detect any kind of garbage in the URL that goes outside of this format so I can return a 404. - Grant P.S. The second variant above could be changed to the following if it is better for analysis: /page-name-1-2.html -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/