- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Microsoft
- >
- Examples of ActivePerl 5.8.6.811 code
Operating System - Microsoft
1821051
Members
2703
Online
109631
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
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
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
12-27-2004 04:10 AM
12-27-2004 04:10 AM
Hi,
I am new to Perl but need to write a script that sends alerts back to OVO (OpenView Operations). The script will run on Win2K, XP and 2003.
The script would need to do the following:
1. Check if a particular configuration file exists on the system where it is run. If the file does not exist, execute an OVO command and exit with value 1. Therefore, need some examples of how to check if a file exists.
2. If the configuration file exists, start reading it. Each line of the configuration file will have two columns (separated by one space). The first colume will contain text in quotes (e.g. "test1" or "This is a test"). The second column will contain numbers (e.g. 1, 3, etc). So, the cofig file will look something like this:
"test" 2
"This is a test" 3
...and so on
Therefore, need some examples of reading a file and assigning contents to variable.
3. When each line is read, assign the value in the first column to variable #1, and the value on the second column to variable #2. Therefore, need examples of how to assign values read to variables.
4. The script needs to execute some OVO utilities and act on variable #1 and #2. Therefore, need some examples of calling other .exe programs from Perl scripts.
5. Compare a variable's value to a numeric value.
Can you please provide some examples of code snippets that would do the above 5?
Thanks so much and sorry for the long description.
I am new to Perl but need to write a script that sends alerts back to OVO (OpenView Operations). The script will run on Win2K, XP and 2003.
The script would need to do the following:
1. Check if a particular configuration file exists on the system where it is run. If the file does not exist, execute an OVO command and exit with value 1. Therefore, need some examples of how to check if a file exists.
2. If the configuration file exists, start reading it. Each line of the configuration file will have two columns (separated by one space). The first colume will contain text in quotes (e.g. "test1" or "This is a test"). The second column will contain numbers (e.g. 1, 3, etc). So, the cofig file will look something like this:
"test" 2
"This is a test" 3
...and so on
Therefore, need some examples of reading a file and assigning contents to variable.
3. When each line is read, assign the value in the first column to variable #1, and the value on the second column to variable #2. Therefore, need examples of how to assign values read to variables.
4. The script needs to execute some OVO utilities and act on variable #1 and #2. Therefore, need some examples of calling other .exe programs from Perl scripts.
5. Compare a variable's value to a numeric value.
Can you please provide some examples of code snippets that would do the above 5?
Thanks so much and sorry for the long description.
Solved! Go to Solution.
- Tags:
- Perl
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2004 07:20 AM
12-27-2004 07:20 AM
Solution
http://search.cpan.org/search?query=openview&mode=all
Enjoy, Have FUN! H.Merijn [ who thinks this belongs in the windows section ]
Enjoy, Have FUN! H.Merijn [ who thinks this belongs in the windows section ]
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