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:
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
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.
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
$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
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..
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
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
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:
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
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
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:
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?
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
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',
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
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
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
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
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] *
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
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
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.
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
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){
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
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
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
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
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.
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.
, 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
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
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
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
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
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
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
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
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',
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
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 {
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.
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
.
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
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
:
$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
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 =
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
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.
-
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
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
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
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
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
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:
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
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
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.
_
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
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
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
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
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
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,
);
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
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
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
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
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
70 matches
Mail list logo