HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- HWP stock price from perl script
Operating System - HP-UX
1826123
Members
5271
Online
109690
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
Forums
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
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
07-01-2002 11:33 PM
07-01-2002 11:33 PM
Hi all,
I need a perl function to get simply the numerical value of HP stock price for inserting into a cgi script..
As my perl is lousy, can anyone help me on this!
ie: must return plain text numerical value. Nothing else.
Thanks!
Bill
I need a perl function to get simply the numerical value of HP stock price for inserting into a cgi script..
As my perl is lousy, can anyone help me on this!
ie: must return plain text numerical value. Nothing else.
Thanks!
Bill
It works for me (tm)
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2002 12:20 AM
07-02-2002 12:20 AM
Re: HWP stock price from perl script
Hi,
I know nothing about perl, but if it is
the HWP you want you may put in a
constant with the value 17,44
The reason is that from may 7 I think it
was, the tickername was changed to HPQ.
The current value is 15.10 and this
will be correct for still a few hours.
So put this in as the value also and
add 1 to it every 7 days and I will be
happy.
Regards
Olav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2002 12:15 PM
07-02-2002 12:15 PM
Solution
Have a look at xquote (http://sunsite.dk/xinvest/xquote.html).
Xquote looks up stock quotes using HTTP.
Just peek at the protocol it's using and
then replicate it using Perl's LWP::UserAgent
and HTTP::Request modules. It should be
something like:
use LWP::UserAgent;
use HTTP::Request;
$ua = new LWP::UserAgent;
$ua->agent("myQuoteThing/1.0");
$req = new HTTP::Request(GET =>
'http://someserver.someplace.com/getquote?symbol=HPQ');
$res = $ua->request($req);
print $res->content();
You have to figure out what to put in the GET field; I
dunno what server to use, nor do I know the exact
syntax of the request. Looking at the Xquote source
code ought to help.
Good luck!
Xquote looks up stock quotes using HTTP.
Just peek at the protocol it's using and
then replicate it using Perl's LWP::UserAgent
and HTTP::Request modules. It should be
something like:
use LWP::UserAgent;
use HTTP::Request;
$ua = new LWP::UserAgent;
$ua->agent("myQuoteThing/1.0");
$req = new HTTP::Request(GET =>
'http://someserver.someplace.com/getquote?symbol=HPQ');
$res = $ua->request($req);
print $res->content();
You have to figure out what to put in the GET field; I
dunno what server to use, nor do I know the exact
syntax of the request. Looking at the Xquote source
code ought to help.
Good luck!
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
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP