I actually want to be able to do all variations of the above including all folders and all files in all the four arrays. but i also want to hit urls that are just off the main bsae url i.e. instead of running through as above I also want to be able to access urls such as http://www.testurl.com/test.pl instead of http://www.testurl.com/cgi-bin/test.pl this gets messed up as my way of doing it will always add the $folder variable into the compiled url via the join statement !!!. I know there will be an easy way of doing this but my brain has switched off !!!! Hard to explain, hopefully someone will get my gist :)@logfiles=("access.html","access_log","log.txt","log.html"); @logfolders=("accesslogdir","logs"); @cgifolders=("cgi","cgi-bin","scripts"); @cgifiles=("script.pl","test.pl","tools.pl"); $baseurl="http://www.testurl.com"; foreach $folder(@logfolders) { foreach $file(@logfiles) { my($url)=join '',$baseurl,$folder,"/",$file; print "Compiled URL - $url\n"; }
In reply to How to list all possible variations ? by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |