LWP Help

2009-06-17 Thread steve silvers
I have my below snippet that when I run it from my website, it returns the query to Yahoo, but all the links are screwed up? How do I fix this? Also how can I add multiple searches to this for one call. Thanks in advance. #!/usr/bin/perl use LWP::UserAgent; print Content-type:

LWP Help please

2009-05-17 Thread steve silvers
I have looked over the LWP documentation but still have trouble putting the pieces together. Can someone give me a snippet that shows me how to query google for something, and display the results. The examples only show how to match on something and just print that out. How do I display the

How to query a website via Perl

2009-05-12 Thread steve silvers
Can someone please so me how to query a website remotely via cgi. Something like http://somesite/query=$var Then return the results. Thanks in advance _ Windows Liveā„¢: Keep your life in sync.

Find url documents and cunt them - Help please

2005-12-09 Thread steve silvers
I'm using DBI, and searching about 300,000 text fields in my database. What I need to do is grab all instances of a url that leads to documents. Such as http://docs/docs1/help/com3324.html http://docs/docs1/help/com3444.htm So on I need to grab just the name of the documents and print out

Re: Reg Exp - Extracting html files

2005-06-02 Thread steve silvers
$filename; Obviously this returns test2.jar. How can I have this return all of them, there could be one file there could be multilpe? Thank you, Steve From: $Bill Luebkert [EMAIL PROTECTED] To: steve silvers [EMAIL PROTECTED] CC: perl-win32-users@listserv.ActiveState.com Subject: Re: Reg Exp

Reg Exp - Extracting html files

2005-06-01 Thread steve silvers
I'm searching many big text columns in my database and I need to extract just the html file names. So far I'm working with directories and file names. So it needs to grab the file names from examples like. directory/file2.html dir/dir2/testfile.htm and list file2.html testfile.htm etc..

RE: Perl and Images

2005-05-18 Thread steve silvers
silvers' [EMAIL PROTECTED],perl-win32-users@listserv.ActiveState.com Subject: RE: Perl and Images Date: Tue, 17 May 2005 16:17:13 -0500 -- snip 8 -- From: steve silvers [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 17, 2005 12:44 PM To: perl-win32-users

Perl and Images

2005-05-17 Thread steve silvers
Quick question. Is there a way that I can go into a directory with a static html file in it and create a thumbnail image of the html file? Any suggestions or examples greatly appreciated. Steve ___ Perl-Win32-Users mailing list

Perl and MAPI

2005-04-18 Thread steve silvers
Does anyone know how I can use perl to specify an outlook profile, and query the address book. Get a list of all names. Thanks in advance Steve ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe:

Win32::AdminMisc Help Please

2005-03-23 Thread steve silvers
I just ran into a problem with my script. It first pings the servers to make sure they are alive then it grabs the disk space from them. The problem is I had a server hang, but it still responded to the ping. So no my script just times out. I would assume that I need to modify the below

Extracting urls

2005-02-25 Thread steve silvers
The below snippet works ok but needs some improvement. Basically I'm querying data in a text area, can be very long. I just want to grab out the name of the document(s) in each row. while (($Data) = $sth-fetchrow_array) { $Data =~ m|(\w+)://([^/:]+)(:\d+)?/(.*)(\w+)|; print

Reading documents problem

2005-02-17 Thread steve silvers
What I'm doing is searching in a directory that has about 5000 .html files. My script grabs the name of each file, but I also need it to display the first 100 characters or so of text in each file. My snippet below removes all the html, but the results are not working good. All I want is:

How can I do this?

2005-02-17 Thread steve silvers
Right now I have a static html page that has software update links on it. This is delivered from our server, and is used by many notebook users on the road. Is it possible that when they come to my software update page (.html) that a script can read a config or xml file on there local system?

Regular Expression Help Please

2005-02-08 Thread steve silvers
One of the columns I'm calling out of my database is the email one. I'ts in MAPI format, so I need to extract the very last part. So the bottom example I would need to grab JDoe MAPI:{Doe, John}EX:/o=Company/ou=Site/cn=Recipients/cn=JDoe Then I can append the rest as [EMAIL PROTECTED] Every one

Probably need help with a hash to do this

2004-11-10 Thread steve silvers
I have no idea how to do this. I have tens of thousands of lines in a text file that houses numbers for internal purposes. There are usually 20 on a line, with a range of (01 - 80). Example: my @data = ( '08|10|13|16|19|22|28|32|33|37|41|46|47|50|51|52|53|55|71|76',

RE: Probably need help with a hash to do this

2004-11-10 Thread steve silvers
From: Thomas, Mark - BLS CTR [EMAIL PROTECTED] To: 'steve silvers' [EMAIL PROTECTED],[EMAIL PROTECTED] Subject: RE: Probably need help with a hash to do this Date: Wed, 10 Nov 2004 14:29:11 -0500 My understanding of your problem is different from the other responders. I believe what you want

RE: Probably need help with a hash to do this

2004-11-10 Thread steve silvers
Sorry, you were right. What threw me off was you adding all the 99's to the end of each row.. Thank you for the help, this will get me started. Steve From: Thomas, Mark - BLS CTR [EMAIL PROTECTED] To: 'steve silvers' [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: RE: Probably need help

RE: Using Reg Expression in LWP

2004-05-13 Thread steve silvers
just searches on the literal $Time text. How can I fix this? Thanks in advance Steve From: Charles K. Clarkson [EMAIL PROTECTED] To: 'steve silvers' [EMAIL PROTECTED],[EMAIL PROTECTED] Subject: RE: Using Reg Expression in LWP Date: Wed, 12 May 2004 13:58:30 -0500 steve silvers [EMAIL PROTECTED

LWP and Regular Expression

2004-05-07 Thread steve silvers
I'm using LWP::UserAgent to grab data from internal intranet site pages. I can grab the page just fine with: $ua = LWP::UserAgent-new; $ua-proxy(['http', 'ftp'] = 'http://login:[EMAIL PROTECTED]'); $req = HTTP::Request-new('GET',http://google.com;); $res = $ua-request($req); print $res-content

Win32::AdminMisc Anomaly

2004-02-03 Thread steve silvers
Does anyone have a problem running the same script accross different MS platforms? I have a snippet below from the Awin32::AdminMisc docs to get the diskspace size. use Win32::AdminMisc; @Geometry = Win32::AdminMisc::GetDriveGeometry(//server/c\$); $Free = $Geometry[0] * $Geometry[1] *

Perl and Crystal Reports

2004-01-26 Thread steve silvers
Quick question. Does Perl have any modules for Crystal Reports? Basically I have a form that I enter the report parameters into (Start Date, End Date, Report Name, etc...) and I want my script to pass those to the Crystal Report, but not display the report, but have it created in say PDF or

Compare hash and scalar or array

2004-01-26 Thread steve silvers
I'm reading in the values from the ProxyOverride key in the registry to grab the current exclusions. I'm having trouble with my below snippet. I have a hash with all the exclusions that need to be in the reg, but I want to see if one is in there yet and only ad the ones that aren't. #!/Perl

Win32::TieRegistry question

2003-10-01 Thread steve silvers
I'm able to get my DNS information from the registry but updating it is giving me a problem.. $DNS = $Registry-{//$comp_name/LMachine/System/CurrentControlSet/Services/Tcpip/Parameters/Interfaces/@get} or die Problem opening registry DNS: $DNS $^E\n; # Insert values.

Help with better way to do this

2003-08-27 Thread steve silvers
The below snippet works, but is very hard to customize and format into a table. How can this be redone? #!/Perl -w use strict; # - my $numbers =04|09|15|16|21|23|25|29|38|40|41|42|54|55|56|62|64|65|67|68|73|80; my

Help with snippet

2003-08-20 Thread steve silvers
This should be easier than this. The script below works, except where it matches with a number it has a duplicate? #!Perl $count = 0; $nums = 0; $numbers = 04|09|15|16|21|23|25|29|38|40|41|42|54|55|56|62|64|65|67|68|73|80; @all = split(/\|/,$numbers); foreach my $key (1..80){

RE: What is wrong with this?

2003-08-14 Thread steve silvers
ok,ok,ok, I had a major brain fart this morning.. Thank you though for all the responses on this.. Steve From: Stewart, Tom [EMAIL PROTECTED] To: 'steve silvers' [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: RE: What is wrong with this? Date: Tue, 12 Aug 2003 09:28:15 -0600 I think you

Re: Character Class Question

2003-08-04 Thread steve silvers
on the first H and is satisfied. From: Will of Thornhenge [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Character Class Question Date: Mon, 04 Aug 2003 12:06:26 -0700 The regex is mixing character classes and alternative phrases in a confused way. steve silvers wrote: Could someone please make

Re: dynamic reports

2003-07-30 Thread steve silvers
Crystal Reports.. From: Lori [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: dynamic reports Date: Tue, 29 Jul 2003 17:07:21 -0700 I have lots of experience creating web pages that get data from a dbase - and lots creating reports with diff. software, but none that create a dynamic report that

Get time and date for 2 weeks at a time

2003-07-15 Thread steve silvers
Quick question. I need my script to generate two weeks worth of dates and days starting with the Saturdays. So on Friday 07/04/2003 my script would generate the below for the next two weeks, and so on.. 07/05/2003 Saturday 07/06/2003 Sunday 07/07/2003 Monday 07/08/2003

HTML::Mason and mod perl on windows

2003-03-07 Thread steve silvers
Does anyone know where I can find some good useable documentation on setting up HTML::Mason and mod perl on windows with Apache? I installed both via ppm and that went good, but im having trouble adding the needed lines to the httpd.conf file.. and so on.. Thanks in advance. Steve.

sprintf formating float question

2003-01-28 Thread steve silvers
I'm trying to get a percent that's say 80% to the true size of 80.23% im using something like: $percent = 8023; $percent = sprintf( %.2f, $percent); This will give me 80 but I need it to round to 80.12 or so on. Any suggestions greatly appreciated. Steve.

RE: Win32::AdminMisc

2003-01-06 Thread steve silvers
, Thomas A [EMAIL PROTECTED] To: steve silvers [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: RE: Win32::AdminMisc Date: Mon, 6 Jan 2003 13:09:10 -0800 Yes it will, refer to Dave Roth's site (http://www.roth.net/ http://www.roth.net/ ) for detailed information and POD descriptive document

Re: web form editor

2002-11-11 Thread steve silvers
I know what your talking about. Cold Fusion does this really nicely with a bold and underline, italics, ect interface... But I don't think that perl has a module to do this. If your looking to send html email use the Mime::Lite module. From: George Harris [EMAIL PROTECTED] To: [EMAIL

Win32::TieRegistry Question

2002-11-05 Thread steve silvers
The documentation says to use: # \x00 and \0 used to mark ends of each string and end of list. I'm using: $NameServerList-{$_} = [ [\x00111.111.111.111\0222.222.222.222\0],REG_MULTI_SZ]; But this is not working as inteded. The above is the primary and secondary ip addressed. In the registry

Updating wins problem

2002-10-31 Thread steve silvers
The below Perl snippet keeps giving me prototype mismatch errors. The script runs via command line to change the wins entries. ERRORS Prototype mismatch: sub main::NULL () vs none at (eval 1) line 5. Constant subroutine NULL redefined at (eval 1) line 5. Prototype mismatch: sub

Where are older builds of perl?

2002-10-30 Thread steve silvers
I've been surfing the bit unfriendly site of activestate. I can only find the new version 633 for download. Where can I get older versions.. ie: 626 ... 522 Thanks in advance. Steve _ Unlimited Internet access for only

RE: Extracting Common Dates

2002-10-21 Thread steve silvers
Company email: [EMAIL PROTECTED] www.encad.com -Original Message- From: steve silvers [mailto:stevesilvers;hotmail.com] Sent: Sunday, October 20, 2002 12:54 PM To: [EMAIL PROTECTED] Subject: Extracting Common Dates In a nutshell I have a text file with dates in it (01 - 31) that are pipe

Extracting Common Dates

2002-10-20 Thread steve silvers
In a nutshell I have a text file with dates in it (01 - 31) that are pipe delimited. In one month I might have. 01|05|10|14|22|30 the next month I might have 01|10|22|28|31 The lowest number is obviously 01, and can reach 31. I need to read in the text file, which is done but I need to know

Oracle SQL Statement help

2002-08-29 Thread steve silvers
Im using DBI to connect to a Oracle database and i'm having trouble with this: In a nut shell. I have a table called DATA, and a column called DATE_OF_BIRTH. I need to see if the person is under 21 years old. So I need to compare the DATE_OF_BIRTH with whatever the current date is. I have

MIME::Lite

2002-08-09 Thread steve silvers
I'm using MIME::Lite to send HTML emails to people who opt in for our email list. The problem is that if there is a bad email the script just errors and quits. Is there a way to have the below write the bad emails to a text file and keep going instead of just quiting? MIME::Lite-send('smtp',

Connect to Authorizenet problem

2002-07-16 Thread steve silvers
I can connect just fine with a simple form page that submits to Authorizenet directly: form method=post action=https://secure.authorize.net/gateway/transact.dll; input type=hidden name=x_Version value=3.0 input type=hidden name=x_Login value=login input type=hidden name=x_Password

FILEHANDLE Problem

2002-07-15 Thread steve silvers
This is going to drive me nuts I have my test snippet below #!/Perl When I run this as shown below, I get the error: Invalid argument. open(FILE, d:\path_to\textfiles\test.txt) or die Can't open $!; if(eof(FILE)) { print IM EMPTY; } else {

Submit post from a Perl script.

2002-07-12 Thread steve silvers
I asked this question a little bit back, and Bill responded with install Net::SSL and IO::Socket::SSL Are these modules made for Windows, or just unix/linux. I'm running on Windows 2000 Adv Server. If these won't work on Windows, is there another way to do this. Thank you. Steve.

Why won't this work right?

2002-07-01 Thread steve silvers
I have a fill out form and in the text area I want to limit the post to 200 characters max. I'm using an Access database with a memo field. my $setnum = 200; #Maximum number of characters allowed per entry. if(length($text) $setnum) { my $chars = $text =~ s/([a-z])/$1/gi; #count

Re: Compare dates question

2002-06-26 Thread steve silvers
. From: $Bill Luebkert [EMAIL PROTECTED] To: steve silvers [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: Compare dates question Date: Tue, 25 Jun 2002 12:24:19 -0700 steve silvers wrote: To get the current date im using. my ($mday, $mon, $year) = (localtime(time))[3..5]; my $startdate

Compare dates question

2002-06-25 Thread steve silvers
To get the current date im using. my ($mday, $mon, $year) = (localtime(time))[3..5]; my $startdate = sprintf %02u/%02u/%u, $mon + 1, $mday, $year + 1900; Which gives me 06/25/2002 I have this written to my database in the startdate field. When people register on the intranet, how can I tell

Re: Regular Expression Help

2002-06-10 Thread steve silvers
: $query-('areacode') =~ m/\d{3}/g; I want to make sure that there is only 3 digits, not two, or four. Steve. From: Stephen J Martin [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: steve silvers [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: Regular Expression Help Date: Mon, 10 Jun 2002 14:50

Cookie Help Please

2002-05-30 Thread steve silvers
I send a cookie called login with the parameters firstname=johnlastname=doe All I want to do is look for the cookie called login. Grab it if it exists, and parse the name value pairs to write Welcome back John Doe. #!/Perl $get_cookie = $query-cookie('login'); @get_cookie =

Generating random numbers?

2002-05-28 Thread steve silvers
I have seen a few ok random number generator snippets but none really look like they work too well. Take the two below arrays. @array qw(1 2 3 4 5 6 7 8 9); @array2 qw(01 02 03 04 99 88); I want to be able to get either single numbers or double numbers and limit how many to generate. I can't

GD::Graph::pie

2002-05-18 Thread steve silvers
I've been looking at the samples for this module and have them working fine. But my question is, this creates actual .png, or .gif files. Is there a way to create a pie chart dynamically on the fly without having to write them to disk? Thanks in advance. Steve.

Re: GD::Graph::pie

2002-05-18 Thread steve silvers
- From: steve silvers [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, May 18, 2002 9:56 PM Subject: GD::Graph::pie I've been looking at the samples for this module and have them working fine. But my question is, this creates actual .png, or .gif files. Is there a way to create

Re: GD::Graph::pie

2002-05-18 Thread steve silvers
in advance. Steve From: Carl Jolley [EMAIL PROTECTED] To: steve silvers [EMAIL PROTECTED] CC: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: GD::Graph::pie Date: Sat, 18 May 2002 12:33:14 -0400 (EDT) On Sat, 18 May 2002, steve silvers wrote: In the code snippet below i'm just looking to have

Regular Expression

2002-05-05 Thread steve silvers
I have seen a couple of good regular expression questions asked and answered. Now I have a question. This is probably easy but i'm stuck on it. All I want to do is take. my @numbers = (01,02,03,03,05,08,09,12,14,13,11,18,17,12,15,16,15,16,12,13,14,16,17,22,23,24,25,25,23,22,21,20); so

username and password question

2002-03-06 Thread steve silvers
I have a small script that when called gives a username and password text box and a submit button. html titletest/title link rel=\stylesheet\ type=text/css href=\../frame/global.css\ head /head body bgcolor=\#ee\ center table

Sybase SQL Anywhere version 5.5.04 question

2002-02-09 Thread steve silvers
Does anyone know where or if I can get a driver to access the Sybase SQL Anywhere database? Basically here is what I need to do. I want to use MS SQL Server DTS wizard to grab the data from the Sybase database and put it into Oracle. The Sybase SQL Anywhere server resides on its own server as

DBI show views in a database

2001-12-30 Thread steve silvers
I can use DBI to show all the tables in a particular database, can I use it to show the views also?? If so, a code snippet would be great. Thanks in advance. Steve _ Chat with friends online, try MSN Messenger:

Creating a bar or pie chart from database values??

2001-12-21 Thread steve silvers
I want to query my database, and return a bar or pie graph with the results. With different colors. Like the number of departments, or people in each dept. What is the best way to go about this? Thanks in advance. Steve _ Send

DBI or Network module??

2001-11-19 Thread steve silvers
This question pertains to MS SQL Server. When I set up a DSN to a database using the SQL Server driver I get to the point where I choose the server on the network. Their may be 10 different server with MS SQL running and I can choose one. Can I do this with Perl? In other words see all the

Regular Expression, matching dates

2001-06-18 Thread steve silvers
I need a regular expression that will match dates in the following format. January 01, 2001 January 15, 2001 February 01, 2001 so on. All dates are spelled out March, April, May... Any suggestions. Thanks in advance. Steve. _

Getting text from HTML pages

2001-06-08 Thread steve silvers
I have all sorts of static HTML pages, that I need to read in with a script and grab the text out of them. It's pretty simple. All the static HTML pages are basically. pthis is the text. pthis is the text. so on .. How hard is it to do this?? I know I can search for words in a static

Server Side Include Question

2001-05-14 Thread steve silvers
Im using SSI and have a question. My home page (index.shtml) calls in two Perl scripts. One delivers a scroll box, that is populated from my database, and the other delivers hyperlinks, also populated by my database. I deliver a max of 10 hyperlinks to fit in the allowed area. I have it so

HTML::Embperl

2001-04-20 Thread steve silvers
Im running win2000 IIS 5 and trying to install HTML::Embperl. After I nmake I get an error: Cannot open include file: windows.h: No such file of directory. So I went into win32.h file and commented it out and reran nmake. Then it can't find winsock.h Do I need to manually find and install

Image Magic and HTML::Embperl problems

2001-04-20 Thread steve silvers
Im running windows 2000 iis5 with perl 522. Im trying to build Image Magic and HTML::Embperl, but they both keep giving me the same error message. When I nmake, it runs then I get a bunch of garble, with: Magick.c 'cl' is not recognized as an internal or external command, operable program or

SQL Question

2001-02-16 Thread steve silvers
Im running MS SQL Server 7.0 I have a table with a startdate and enddate column in it. In my perl script I query it SELECT * FROM table where 'todays_date_from_script' = 'startdate' and "todays_date_from_script' = 'enddate' When I input the data into the table I use something like 02-16-2001

Win32::GUI Problems

2001-02-16 Thread steve silvers
Im new to using Win32::GUI. I installed it via nmake, and tried this sample script: use Win32::GUI; @ret = Win32::GUI::ChooseFont( -name = "Courier New", -height = 14, -size = 180, -italic = 1, -ttonly = 1, -fixedonly = 1, -script = 0, -effects = 1, );

xml::parser install

2001-02-12 Thread steve silvers
Im trying to install xml::parser and not having much luckim running win2000 pro. perl v.5.6 I couldn't find it using ppm. Does anyone know where it is...install it via nmake, but I get the error:Too many errors encountered; the rest of the message is ignored: Expat must be installed prior to

Regular Expression question

2000-11-21 Thread steve silvers
Im calling a bunch of rows from my database. In the while loop. while(my $Dataref = $sth-fetchrow_hashref) { my %Data = %{$Dataref}; my $text = ($Data{val}); $text = (/(www\.[\w\.\-\/\\=\+\%\:\?]*[a-zA-Z\/0-9])[\001\074]*/) $emailaddress = $1; print

Quick Question

2000-11-07 Thread steve silvers
I have notice on a few sample scripts in here there using this: $| = 1; at the top of the script. I know that $| is the output autoflush, but what is this for? Is it needed? Steve _ Get Your Private, Free E-mail from MSN

HTML::Pager

2000-11-06 Thread steve silvers
I installed the HTML::Pager and HTML::Template modules. Does anyone have a sample of how the two work together. Perferably calling rows from a database using DBI. Thanks in advance. Steve _ Get Your Private, Free E-mail

installing DBIx::Recordset

2000-11-06 Thread steve silvers
Im sure the DBIx::Recordset module is not part of the standard Activestate ppm. I want to use this module. Im on Win 2000 with IIS 5. Right now if I run a test script I obviously get the error: Can't locate DBIx/Recordset.pm in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib .) Help me