View Full Version : Can you combine perl/cgi scripts?
mcgmark
07-24-2006, 09:43 PM
I have a script that e-mails submitted form data.
I have a second script that uploads a user selected file from a form to the server.
Is there a tutorial on how I could add the second script to the first script?
Or any pointers u can give me to get started?
kaydara
07-25-2006, 10:27 AM
you want to upload a file and then mail it as attach ?
KevinADC
07-25-2006, 06:23 PM
well, you can just copy and paste the two codes together into one script. You can also use "use" and "require" to chain scripts and modules together.
http://perldoc.perl.org/functions/use.html
http://perldoc.perl.org/functions/require.html
mcgmark
07-31-2006, 03:13 PM
well, you can just copy and paste the two codes together into one script. You can also use "use" and "require" to chain scripts and modules together.
http://perldoc.perl.org/functions/use.html
http://perldoc.perl.org/functions/require.html
Can i really just paste the second script inside and below the first one?
the explanation for Use and Require is a lil over my head should i really be focused on learning them to get this to work?
KevinADC
07-31-2006, 07:37 PM
Can i really just paste the second script inside and below the first one?
You should be able to but it might require a bit more editing than just copy code B to the bottom of code A, but sometimes that is all that is necessary.
the explanation for Use and Require is a lil over my head should i really be focused on learning them to get this to work?
If you want to write better perl scripts then you have to know about "use" and "require", they are used all the time and are necessary for writing modular scripts.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.