English is not my first language, so I am having some trouble explaining what I want to do. :o)
You are correct in your assumption that 1.pl is usually call via a browser using:
But it is not the filename.txt I want.
I want the result of the above url/execution written to a file, using a second script, 2.pl