- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Perl Script help for infinite loopand exit for use...
Operating System - Linux
1753460
Members
4536
Online
108794
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
тАО10-27-2009 04:38 AM
тАО10-27-2009 04:38 AM
I just want to run 5 perl script from a single one.I wrote the script(attached).Now I want to continue a loop until user press option as "n".I used Do-while llop,but it's not working,i.e,working same for either "y" or "n".
could someone help in this regard?
could someone help in this regard?
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2009 11:46 AM
тАО10-27-2009 11:46 AM
Solution
Hi:
Attached you will find a version that senses your responses. You have mixed "=", "==" and 'eq' operators and forgotten to 'chomp' some of your input. I have maintained your formatting style so you can see what and where changes were made.
You should ALWAYS set the 'strict' and the 'warnings' pragmas. You will save yourself considerable grief in debugging silly mistakes.
Lastly, a 'do...while' or 'do..until' in Perl is not nearly as powerful as a 'while...do' loop since 'ntxt', 'last' and 'redo' controls cannot be used to exit the block.
Regards!
...JRF...
Attached you will find a version that senses your responses. You have mixed "=", "==" and 'eq' operators and forgotten to 'chomp' some of your input. I have maintained your formatting style so you can see what and where changes were made.
You should ALWAYS set the 'strict' and the 'warnings' pragmas. You will save yourself considerable grief in debugging silly mistakes.
Lastly, a 'do...while' or 'do..until' in Perl is not nearly as powerful as a 'while...do' loop since 'ntxt', 'last' and 'redo' controls cannot be used to exit the block.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2009 10:52 PM
тАО10-27-2009 10:52 PM
Re: Perl Script help for infinite loopand exit for user i/p mismatch
Thanks a lot James.After looking into the code snap providerd by you,I can really understand that usage of mainframe and not using PERL for long time really blunted my PERL skill ;-)
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP