- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Proper debugging of perl script
Operating System - HP-UX
1753856
Members
7236
Online
108809
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
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
тАО07-22-2008 12:24 PM
тАО07-22-2008 12:24 PM
Proper debugging of perl script
Hello,
I have a perl script which requires human intervention. The human needs to give answers to questions asked.
How do I debug a perl script, stepping through it line by line, while answering the question that come up, without it looking as though the answers are debugging commands?
Is there an escape character I can use when an answer is needed?
I have a perl script which requires human intervention. The human needs to give answers to questions asked.
How do I debug a perl script, stepping through it line by line, while answering the question that come up, without it looking as though the answers are debugging commands?
Is there an escape character I can use when an answer is needed?
Ross Hanson
- Tags:
- Perl
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-22-2008 04:55 PM
тАО07-22-2008 04:55 PM
Re: Proper debugging of perl script
Hi Ross:
Interesting. Perhaps this helps. Consider:
# cat /.debugme
#!/usr/bin/perl
use strict;
use warnings;
my ( $count, $name, $title ) = ( 0, undef, undef );
$|++;
print "Enter your name\n";
chomp ( $name = );
print "OK, so you are called '$name'\n";
$count++ for (0..9);
print "count is $count\n";
print "Enter your title\n";
chomp ( $title = );
print "OK, and you are a '$title'\n";
1;
...now do:
# PERLDB_OPTS="NonStop frame=1 AutoTrace" perl -d ./debugme
Regards!
...JRF...
Interesting. Perhaps this helps. Consider:
# cat /.debugme
#!/usr/bin/perl
use strict;
use warnings;
my ( $count, $name, $title ) = ( 0, undef, undef );
$|++;
print "Enter your name\n";
chomp ( $name =
print "OK, so you are called '$name'\n";
$count++ for (0..9);
print "count is $count\n";
print "Enter your title\n";
chomp ( $title =
print "OK, and you are a '$title'\n";
1;
...now do:
# PERLDB_OPTS="NonStop frame=1 AutoTrace" perl -d ./debugme
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2008 12:04 AM
тАО07-23-2008 12:04 AM
Re: Proper debugging of perl script
As already suggested by James,
Perl comes with nice debugger
which among many other things lets you step through your code.
For a quick ref enter the debugger
$ perl -de0
and issue
DB<1> h
or
DB<2> |h h
For more indepth tutorial issue
$ perldoc perldebug
Perl comes with nice debugger
which among many other things lets you step through your code.
For a quick ref enter the debugger
$ perl -de0
and issue
DB<1> h
or
DB<2> |h h
For more indepth tutorial issue
$ perldoc perldebug
Madness, thy name is system administration
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