- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- perl problem -- endless loop only with web
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-13-2004 06:19 AM
тАО01-13-2004 06:19 AM
My perl app makes a file based on a date that is passed in. If two dates are passed in, it'll make several files one for each date in the range by running thru the code for the first date and then calling itself in a loop with each subsequent date.
if ($doMultiple) {
foreach $dates (@dates) {
system "/path2apps/myAppName $dates";
}
}
When I run my app on the command line, it makes all the files and exits.
When I run the app from the web, it goes into an endless loop. I added some debug statements to check the dates in my dates array and they are what is expected -- one date for each day in the range.
Can anyone offer help?
TIA,
Anna
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-13-2004 07:11 AM
тАО01-13-2004 07:11 AM
Re: perl problem -- endless loop only with web
1) What is the current directory
2) Who is the user the app is running as
3) What the value of PATH is
4) If STDIN/STDOUT/STDERR are set to a terminal
An interactive session will have these critical items setup (via .profile).
Do you know where in the script it is looping?
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-13-2004 07:22 AM
тАО01-13-2004 07:22 AM
Re: perl problem -- endless loop only with web
I'm attaching perl script that displays environment at perl run time.
It might help you out.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-13-2004 07:44 AM
тАО01-13-2004 07:44 AM
Re: perl problem -- endless loop only with web
I still don't know why it worked in its previous form on the command line and not via the web, other than perhaps it has something to do with how CGI works.
Anna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-13-2004 06:43 PM
тАО01-13-2004 06:43 PM
SolutionIn that case, execution of external programs is not always supported.
Best way, anyway, is to keep as much as possible in one executable. In your case, a simple solution would have been to not call your script using system, but to put the stuff you need to do in a function and call that function on the line you now have the system call...