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: text/html\n\
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.
http://windowslive.com/explore?oc
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
//;
print $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-
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..
an
>
To: "'steve silvers'"
<[EMAIL PROTECTED]>,
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@list
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-Win32-Users@listserv
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: http://listserv.A
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 snippet.
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 "$4\
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? T
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:
File1
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
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 PROTE
e looking to find the same numbers "pattern" in X amount of rows of data.
I hope that helps out a bit. It's hard to explain.
Thank you in advance
Steve
From: "Thomas, Mark - BLS CTR" <[EMAIL PROTECTED]>
To: 'steve silvers'
<[EMAIL PROTECTED]>,[E
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',
'06|11|16|19|20|29|31|35|39|4
e with
the static time it works great. But it seems like this variable in this
block is not incapsulated, and probably just searches on the literal "$Time"
text. How can I fix this?
Thanks in advance
Steve
From: "Charles K. Clarkson" <[EMAIL PROTECTED]>
To: "'
I'm trying to dynamically add the days date to the below but this is not
working. How can I add a $var with a formatted date and pass it?
$getpage = HTTP::Request->new('GET',"http://somesite.html";);
$res = $ua->request($getpage);
$all = $res->content if $res->is_success;
$all =~ /<\/td>$Time<
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->c
I have seen a few messages concerning this module, and I really need to use
this. Could you please tell me what this module can and can't do. I need a
script that will connect to my Exchange Server 5.5, on an NT domain, and
grab all the email messages, attachments either by user or group.
Will
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] * $Geome
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
my
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 HTML
The samething.. ARRAY(0x183f058)
From: Tobias Hoellrich <[EMAIL PROTECTED]>
To: "'steve silvers'" <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED]
Subject: RE: Win32::TieRegistry question
Date: Wed, 01 Oct 2003 10:28:10 -0600
And what happens if you say:
$DNS->{
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 $numbers2="02|04|11|15|16|23|44|54|62
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
most like it stops 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 wr
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 tha
This might be a dumb question but ill give it a shot. In a SELECT statement
you grab the returned data via
while (($bla, $bla2) = $sth2->fetchrow_array) {
print the data..
}
But if you use a statement as a count.
SELECT COUNT(*) FROM TABLE WHERE bla..
How do you get the count number. Do you
I have another question about military time. I have two columns in my
database that store start and end times. When I call out the data say like
below..
$starttime = 08:00;
$endtime = 17:00;
First - how can I get that this is "9" hours? or "9 hours and 5 minutes"...
Second - how can I display it
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 Tuesd
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.
__
My form passes the search param to my script. My sql call is something like.
my $search = $query->param('search');
SELECT * FROM table WHERE search_col LIKE '%$search%'
But if I enter the search term "ORACLE" or "oracle" I get different
results.. Does anyone kown how to work around this case s
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.
_
dvance.
Steve
From: "Gibb, 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.ro
use the Win32::TieRegistry module. This works great for this..
Steve
From: "Hawley, Eric" <[EMAIL PROTECTED]>
To: "Perl-Win32 \(E-mail\)" <[EMAIL PROTECTED]>
Subject: DNS and WINS question
Date: Thu, 12 Dec 2002 14:45:20 -0500
Would I want to do is to connect remotely to other machines on t
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 PROTE
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 r
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 main::W
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 $21.95/
CAD, Inc.
- A Kodak 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
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 w
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 t
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',
The problem isn't from the From: but has to do with the way that MIME::Lite
uses SMTP. More or less is there a way to have this log the error and keep
running in stead of just craping out
>From: Jing Wee <[EMAIL PROTECTED]>
>To: "steve silvers" <[EMAIL PRO
I can connect just fine with a simple form page that submits to Authorizenet
directly:
https://secure.authorize.net/gateway/transact.dll";>
Now the below snippet keeps throwing back the error:
Invalid merchant login or the account is inactive
#!/Perl
use Net::SSL;
use LWP::UserAge
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 char
.
>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.
>
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 PROTEC
I send a cookie called login with the parameters"
firstname=john&lastname=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 = spl
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
hanks 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 wro
s to work.
Thanks in advance.
Steve.
>From: "Sisyphus" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Subject: Re: GD::Graph::pie
>Date: Sun, 19 May 2002 22:48:32 +1000
>
>
>- Original Message -
>From: "steve silvers" <[EMAIL PRO
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.
___
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 on,
I have a small script that when called gives a username and password text
box and a submit button.
test
Test
Username:
Password:
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: http://messenger.msn
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 and
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 SQL
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.
_
G
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.
this is the text.
this is the text.
so on ..
How hard is it to do this?? I know I can search for words in a static HTML
In my form in the text area I want to limit the size of input. I don't just
want to do this on the client side, but also in my script. If im using:
$query->{the_text}
What would be the best way to set the limit to say, 1000 characters.
Any suggestions?
Thanks in advance.
Steve
_
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
whe
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 b
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 thes
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 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 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
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 unde
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 fro
79 matches
Mail list logo