- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Couple Perl questions
Operating System - HP-UX
1819966
Members
3699
Online
109607
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
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
тАО06-05-2002 09:16 AM
тАО06-05-2002 09:16 AM
Hello,
I am trying to find a way to find if a variable is numeric. Does anyone know how the isnum function works? Do you need to define a library to use it? Is there another way to do this.
Also, is there an equivalent to the ksh $? in Perl for the return code of a command?
Thanks,
Jason
I am trying to find a way to find if a variable is numeric. Does anyone know how the isnum function works? Do you need to define a library to use it? Is there another way to do this.
Also, is there an equivalent to the ksh $? in Perl for the return code of a command?
Thanks,
Jason
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-05-2002 09:31 AM
тАО06-05-2002 09:31 AM
Re: Couple Perl questions
In PERL, $? is also known as $CHILD_ERROR. It holds the error value of the last `cmd`, pipe close, wait, waitpid, or system function.
Also at your disposal is $@ ($EVAL_ERROR) which is the error value for the last eval or do expression.
I am not aware of any such implicit variable that holds the error value of the last PERL internal function.
Also at your disposal is $@ ($EVAL_ERROR) which is the error value for the last eval or do expression.
I am not aware of any such implicit variable that holds the error value of the last PERL internal function.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-05-2002 12:39 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-05-2002 10:56 PM
тАО06-05-2002 10:56 PM
Re: Couple Perl questions
If something is a number is much more complicated than Rodney shows. Think about fractionals and exponents. The FAQ show a complete example of a complicated regex that can deal with all.
If it is digits only, you could (more safely) do
m/^\s*\d+\s*$/; # strip leading and trailing spaces
Jordan, the long names are *only* available under 'use English'. Use $? and $! after simple system interaction, and $@ after eval
If it is digits only, you could (more safely) do
m/^\s*\d+\s*$/; # strip leading and trailing spaces
Jordan, the long names are *only* available under 'use English'. Use $? and $! after simple system interaction, and $@ after eval
Enjoy, Have FUN! H.Merijn
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.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP