CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Need a Custom or Prewritten Perl Program?: I need a program that...:
how can i pass the value from "from.pl" to "to.pl"???

 



retfej
Novice

Feb 22, 2014, 5:40 AM

Post #1 of 9 (20657 views)
how can i pass the value from "from.pl" to "to.pl"??? Can't Post

just like for example
"from.pl"

$sum = 1 +1;

how can i send/pass it to "to.pl"??

and how can i get the value from "from.pl"??

thanks in advance for then coming answers..


BillKSmith
Veteran

Feb 22, 2014, 8:48 PM

Post #2 of 9 (20619 views)
Re: [retfej] how can i pass the value from "from.pl" to "to.pl"??? [In reply to] Can't Post

We need more information. I think that "to.pl" and "from.pl" are files that contain perl code. Are they complete programs? Does one contain a subroutine of the other? Can one execute the other? Must one finish before the other starts? Must they run in parallel? Do you need multiple copies of either one?

Please tell us more about your original problem. We may be able to suggest a solution that does not use multiple files at all.
Good Luck,
Bill


retfej
Novice

Feb 23, 2014, 5:05 AM

Post #3 of 9 (20616 views)
Re: [BillKSmith] how can i pass the value from "from.pl" to "to.pl"??? [In reply to] Can't Post

i don't know the code to submit value from "from.pl" to "to.pl",..just need example of codes that can do the thing sir..thanks..


Laurent_R
Veteran / Moderator

Feb 23, 2014, 7:59 AM

Post #4 of 9 (20605 views)
Re: [retfej] how can i pass the value from "from.pl" to "to.pl"??? [In reply to] Can't Post

Please kindly provide the information that Bill asked for. We can't help you with such a vague question. For example, can we assume that there is a from.pl program that does some calculations and then calls a to.pl program? Or do you have in mind something else?


BillKSmith
Veteran

Feb 23, 2014, 12:33 PM

Post #5 of 9 (20587 views)
Re: [retfej] how can i pass the value from "from.pl" to "to.pl"??? [In reply to] Can't Post

No one here is going to write and debug examples which may not even apply to your situation.

If "from.pl" and "to.pl" are complete perl programs, why not use your shell to pipe the STDOUT of "from.pl" to the STDIN of "to.pl"? (only works if these handles are not used for anything else!)
Good Luck,
Bill


retfej
Novice

Feb 23, 2014, 2:06 PM

Post #6 of 9 (20579 views)
Re: [Laurent_R] how can i pass the value from "from.pl" to "to.pl"??? [In reply to] Can't Post

you can assume that there is a calculation sir..


FishMonger
Veteran / Moderator

Feb 23, 2014, 9:23 PM

Post #7 of 9 (20558 views)
Re: [retfej] how can i pass the value from "from.pl" to "to.pl"??? [In reply to] Can't Post

If you are unwilling to provide the requested info, then this question will be considered as spam and will be removed.


retfej
Novice

Feb 24, 2014, 4:39 AM

Post #8 of 9 (20541 views)
Re: [FishMonger] how can i pass the value from "from.pl" to "to.pl"??? [In reply to] Can't Post

sir..the calculation is processed in "from.pl" and the value calculated from the "from.pl" will be the output in the "to.pl" ..sorry sir but i don't know how to use subroutines..Frown


FishMonger
Veteran / Moderator

Feb 24, 2014, 8:21 AM

Post #9 of 9 (20525 views)
Re: [retfej] how can i pass the value from "from.pl" to "to.pl"??? [In reply to] Can't Post


Quote
sorry sir but i don't know how to use subroutines.

That's one of the many things you need to learn and is probably what you need to use here, but since you have not shown us your code or given a clear explanation of what you need to do, we can only make guesses. My crystal ball broke many years ago.

Get a good beginning level Perl book and start reading.
http://shop.oreilly.com/product/0636920018452.do


(This post was edited by FishMonger on Feb 24, 2014, 9:11 AM)

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives