RE: urgent help required
It looks more like run-time error from HTML::Parser. Are you sure that the content of your client's page is the same as your localhost page? -- Petr Smejkal -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Vishal Madan Sent: Wednesday, March 14, 2001 3:42 PM To: 'Peter Eisengrein' Cc: [EMAIL PROTECTED] Subject: RE: urgent help required thanks a lot for prompt response here is the change in the given programe there was a varibale my($testUrl)="http://www.domain.com/sample/../.." i changed it to my url as my($testUrl)="http://127.0.0.1/sample/../.." then i get this error regards Vishal -Original Message- From: Peter Eisengrein [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 14, 2001 9:41 AM To: 'Vishal Madan'; [EMAIL PROTECTED] Subject: RE: urgent help required it would be helpful if you show the change you made. -Original Message- From: Vishal Madan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 14, 2001 9:11 AM To: [EMAIL PROTECTED] Subject: urgent help required Hi, I am new to world of perl programming. I got a perl programme from client. when i made some small change to it and tried to compile it, it gave a error " element not found at line ... in parser.pm". i tried all the possible things but compile error is still there. any help is highly appericiated Regards Vishal ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: urgent help required
thanks for prompt response. 1. The problem goes away if I put the old value back. I am able to compile it . 2. My requirement is that I have to use this localhost address (127.0.0.1) hope to hear from u soon thanks again Regards Vishal -Original Message- From: Cornish, Merrill [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 14, 2001 10:02 AM To: Vishal Madan Cc: [EMAIL PROTECTED] Subject: RE: urgent help required First question: If you put the value back to what it was, does the problem go away? This will verify that THIS is the change that actually caused the problem. Second question: You switched to the loopback address. Have you tried a real host name to see of the special-case loop back is causing the problem? Merrill -Original Message- From: Vishal Madan [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, March 14, 2001 8:42 AM To: 'Peter Eisengrein' Cc: [EMAIL PROTECTED] Subject: RE: urgent help required thanks a lot for prompt response here is the change in the given programe there was a varibale my($testUrl)="http://www.domain.com/sample/../.." i changed it to my url as my($testUrl)="http://127.0.0.1/sample/../.." then i get this error regards Vishal -Original Message- From: Peter Eisengrein [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 14, 2001 9:41 AM To: 'Vishal Madan'; [EMAIL PROTECTED] Subject: RE: urgent help required it would be helpful if you show the change you made. -Original Message- From: Vishal Madan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 14, 2001 9:11 AM To: [EMAIL PROTECTED] Subject: urgent help required Hi, I am new to world of perl programming. I got a perl programme from client. when i made some small change to it and tried to compile it, it gave a error " element not found at line ... in parser.pm". i tried all the possible things but compile error is still there. any help is highly appericiated Regards Vishal ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: urgent help required
if i switch it to different ip address then too this problem is there -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Cornish, Merrill Sent: Wednesday, March 14, 2001 10:10 AM To: Vishal Madan Cc: [EMAIL PROTECTED] Subject: RE: urgent help required OK, the next test is to switch it to a different IP address to see if it's the number-dot-number-dot-number-dot-number format that is creating the problem rather than 127.0.0.1 itself. Merrill -Original Message- From: Vishal Madan [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, March 14, 2001 8:59 AM To: 'Cornish, Merrill' Cc: [EMAIL PROTECTED] Subject: RE: urgent help required thanks for prompt response. 1. The problem goes away if I put the old value back. I am able to compile it . 2. My requirement is that I have to use this localhost address (127.0.0.1) hope to hear from u soon thanks again Regards Vishal -Original Message- From: Cornish, Merrill [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 14, 2001 10:02 AM To: Vishal Madan Cc: [EMAIL PROTECTED] Subject: RE: urgent help required First question: If you put the value back to what it was, does the problem go away? This will verify that THIS is the change that actually caused the problem. Second question: You switched to the loopback address. Have you tried a real host name to see of the special-case loop back is causing the problem? Merrill -Original Message- From: Vishal Madan [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, March 14, 2001 8:42 AM To: 'Peter Eisengrein' Cc: [EMAIL PROTECTED] Subject:RE: urgent help required thanks a lot for prompt response here is the change in the given programe there was a varibale my($testUrl)="http://www.domain.com/sample/../.." i changed it to my url as my($testUrl)="http://127.0.0.1/sample/../.." then i get this error regards Vishal -Original Message- From: Peter Eisengrein [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 14, 2001 9:41 AM To: 'Vishal Madan'; [EMAIL PROTECTED] Subject: RE: urgent help required it would be helpful if you show the change you made. -Original Message- From: Vishal Madan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 14, 2001 9:11 AM To: [EMAIL PROTECTED] Subject: urgent help required Hi, I am new to world of perl programming. I got a perl programme from client. when i made some small change to it and tried to compile it, it gave a error " element not found at line ... in parser.pm". i tried all the possible things but compile error is still there. any help is highly appericiated Regards Vishal ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: urgent help required
Try using symbolic name localhost instead of IP address. 127.0.0.1 MaT -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Vishal Madan Sent: Wednesday, March 14, 2001 3:11 PM To: [EMAIL PROTECTED] Subject: urgent help required Hi, I am new to world of perl programming. I got a perl programme from client. when i made some small change to it and tried to compile it, it gave a error " element not found at line ... in parser.pm". i tried all the possible things but compile error is still there. any help is highly appericiated Regards Vishal ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: urgent help required
Or for that matter, any name that resolves to your machine's IP address. Create a local HOST file entry to that end if necessary. _ Bruno Bellenger Sr. Network/Systems Administrator -Original Message- From: Jan Matejka [SMTP:[EMAIL PROTECTED]] Sent: mercredi 14 mars 2001 16:58 To: Perl-Win32-Users Konference (E-mail) Subject:RE: urgent help required Try using symbolic name localhost instead of IP address. 127.0.0.1 MaT -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Vishal Madan Sent: Wednesday, March 14, 2001 3:11 PM To: [EMAIL PROTECTED] Subject: urgent help required Hi, I am new to world of perl programming. I got a perl programme from client. when i made some small change to it and tried to compile it, it gave a error " element not found at line ... in parser.pm". i tried all the possible things but compile error is still there. any help is highly appericiated Regards Vishal ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Problem with $reg-Load
Win32::Registry Tweak version 0.00.26. [EMAIL PROTECTED] The following code works sporadically. It seems to fail more than it works. When it fails, $Result, $^E, and $! all appear to be null. The variables $OldSid and $ProfileImagePath contain valid data. Can anyone tell me how to better trouble this situation? use Win32::Perms; use Win32::Registry; use Win32::Lanman; use strict; my $Result = $HKLM-Load($OldSid, "$ProfileImagePath\\NTuser.DAT", REG_LOADTEMPORARY); print "Result of load op: \'$Result\' \'$!\' \'$^E\'\n"; print "$ProfileImagePath\\NTuser.DAT, $OldSid\n"; ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Literal Tokens
Would someone explain the __FILE__ and __LINE__ literal tokens? The camel book say very little concerning them. What would you use them for? Dirk Bremer - Systems Programmer II - AMS Department - NISC 636-922-9158 ext. 652 fax 636-447-4471 mailto:[EMAIL PROTECTED] ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Help with Regexp
Hi all... Im using an HTML template to put the values of a database in the values of the fields. Ive been tying to do that by setting the field value: $variable, to that when I call while (HTML){ print; } the html code input type="text" value="$variable" shows up, when what I want is input type="text" value="my_variable_value". So I need a regexp that would look for s/value="$(wildcard)"/value="$variable_with_same_name_as_wildcard/g one I tried is s/value="$(*)"/value="$main::$1"/g; but I get an error: "/value="$(*)"/: ?+*{} follows nothing in regexp at c:\mydir\mycode line 61" Can anyone help me out? Vinicius Alves Prosites - Solues em Internet Webmaster ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Re: Using Kermit or another protocol with Perl .........
Any reason why you can't just use the Kermit software and its own built-in scripting language? http://www.columbia.edu/kermit/ Ron. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: Literal Tokens
Dirk Bremer wrote: Would someone explain the __FILE__ and __LINE__ literal tokens? The camel book say very little concerning them. What would you use them for? open IN, "infile.txt" or die "Error opening file at module " . __FILE__ . ", line " . __LINE__ . ": $!"; ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: Literal Tokens
Two special literals __LINE__ and __FILE__, which represent the current line number and filename at that point in your program Vishal -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Dirk Bremer Sent: Wednesday, March 14, 2001 2:02 PM To: perl-win32-users Subject: Literal Tokens Would someone explain the __FILE__ and __LINE__ literal tokens? The camel book say very little concerning them. What would you use them for? Dirk Bremer - Systems Programmer II - AMS Department - NISC 636-922-9158 ext. 652 fax 636-447-4471 mailto:[EMAIL PROTECTED] ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: Beginner's problems
incorrect! chomp $word; not $word =~ chomp $word ; -Original Message- From: Bellenger, Bruno (Paris) [SMTP:[EMAIL PROTECTED]] Sent: 15/03/2001 12:29 To: [EMAIL PROTECTED] Subject: RE: Beginner's problems To stay closer to your code, this works : open(IN, "words.txt"); while(IN){ $word = $_ ; $word =~ chomp $word ; print "$word and $word\n"; } The way you did it assigned chomp's return code to $word, not the content of $_ To avoid this, you must write $word =~ chomp $word ; and not $word = chomp $word ; _ Bruno Bellenger Sr. Network/Systems Administrator -Original Message- From: BP Jonsson [SMTP:[EMAIL PROTECTED]] Sent: mercredi 14 mars 2001 14:03 To: [EMAIL PROTECTED] Subject:Beginner's problems Hi, I'm a Perl beginner who has problems with things that according to the literature should be quite straightforward. Suppose that I have this program: open(IN, "words.txt"); while(IN){ $word = chomp; print "$word and $word\n"; } If I the file "words.txt" contains the three lines fred barney dino then this program should print out fred and fred barney and barney dino and dino But all I get is a single digit "1"! WTH is going on? TIA, /BP 8^) -- B.Philip Jonsson mailto:[EMAIL PROTECTED] (delete X) ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Re: Mailman SUCKS !!!!!
On Mon, 12 Mar 2001 15:29:00 -0500, "Smith, Eric - WPAFB/YSXOI" [EMAIL PROTECTED] wrote: This mailman listserve really sucks. I tend to agree, but in this case MailMan is innocent. Please go back to good old reliable majordomo or even lyris. At their worst, they were better than mailman. I have been on these lists since 1996 and this mailman is proving to be the worst. In addition, am getting a very bad taste for Python from thei sucky mailman listeserve. This latest episode of getting hundreds of messages from last ummer and fall is ridiculous. Yes, several of the second-go-around messages were conmplaints about mailman from the initial swap-over. It looks like RoadRunner (mail.houston.rr.com) has been looping *very* old mail back to the sender. If you look at the headers they all contain something like this: | Received: from mail pickup service by mail.houston.rr.com with Microsoft SMTPSVC; |Mon, 12 Mar 2001 09:43:50 -0600 | Received: from listserv.activestate.com ([199.60.48.6]) by mail.houston.rr.com with |Microsoft SMTPSVC(5.5.1877.357.35); |Wed, 7 Jun 2000 02:40:04 -0500 It seems to have stopped for now, so I don't think any further actions are necessary. If you experience problems with any ActiveState infrastructure (mailing lists, web servers, FTP servers etc), please don't post to the mailing lists but send email to one of the standard contact addresses (e.g. [EMAIL PROTECTED]). Otherwise it may not be noticed by the people who are actually in a position to fix things. :-) -Jan (just back in Vancouver from 2 weeks in good old Germany) ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Chomp Issue
Given the following code snippet: { my %Names = map {split /:/} DATA; foreach (sort keys %Names) {print("$_:", chomp $Names{$_},"\n");} } __DATA__ 0:100 Record Id 1:100 Type Of Service 2:100 Account Number 3:100 Capital Credit Number 4:100 Membership Number 5:100 Service Address 6:100 Map Location 7:100 Service Map Location 8:100 Service Location 9:100 Cycle Code 10:100 Type Of Bill Code It returns: 0:1 1:1 2:1 3:1 4:1 5:1 6:1 7:1 8:1 9:1 10:0 If I take the chomp out, it prints fine, although the hash's value has "\n" in it. I would like to remove the "\n" from the hash value, preferably by altering one of the two lines of code, rather than a bunch of new lines. Suggestions? Dirk Bremer - Systems Programmer II - AMS Department - NISC 636-922-9158 ext. 652 fax 636-447-4471 mailto:[EMAIL PROTECTED] ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: Chomp Issue
it is printing 1 because chomp returns 1 on success not the new scalar value. you can do the following... { my %Names = map {chomp;split /:/} DATA; foreach (sort keys %Names) {print("$_:", chomp $Names{$_},"\n");} } that will strip off the CR before mapping to the hash. Matt -Original Message- From: Dirk Bremer [mailto:[EMAIL PROTECTED]] Sent: 13"N3OEZ15"รบ 8:04 To: perl-win32-users Subject: Chomp Issue Given the following code snippet: { my %Names = map {split /:/} DATA; foreach (sort keys %Names) {print("$_:", chomp $Names{$_},"\n");} } __DATA__ 0:100 Record Id 1:100 Type Of Service 2:100 Account Number 3:100 Capital Credit Number 4:100 Membership Number 5:100 Service Address 6:100 Map Location 7:100 Service Map Location 8:100 Service Location 9:100 Cycle Code 10:100 Type Of Bill Code It returns: 0:1 1:1 2:1 3:1 4:1 5:1 6:1 7:1 8:1 9:1 10:0 If I take the chomp out, it prints fine, although the hash's value has "\n" in it. I would like to remove the "\n" from the hash value, preferably by altering one of the two lines of code, rather than a bunch of new lines. Suggestions? Dirk Bremer - Systems Programmer II - AMS Department - NISC 636-922-9158 ext. 652 fax 636-447-4471 mailto:[EMAIL PROTECTED] ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Getting description from Eventlog
I have some Events in my Eventlog that are Informational entries but don't print out the description. Example: Source = OtMan4 Length = 64 EventType = 4 Message = ClosingRecordNumber = 0 RecordNumber = 3231 Strings = * Data = **f***s`*X***h*** *** Timewritten = 984545180 TimeGenerated = 984545180 Category = 0 User = EventID = 1610612740 Computer = KXFDE01 In this example there's no message and the strings only has a '*'. If I went right to the Eventlog on the system the description would read: OTM closed. Where is this information and why can't I get to it? Stanley G. Martin Midwest Consulting Group Sprint Platform Strategy Mgmt 913.315.3133 [EMAIL PROTECTED]
RE: Beautiful Code:RE: Perl MAPI attachment extraction script
Believe it or not but MSDN holds the best information for Win32 programming with Perl. Once you get the hang of converting VB code to Perl code, it is quite easy to get things rolling. That's what I had to do in order to figure out CDO and it's good/bad faults. Since I sent that message (it was delayed a very long time), I have updated the Perl script quite a bit. I can now delete attachments, ignore attachments, and I'm working on adding the ability to delete an entire message based on the subject line. Obviously, these are not fool-proof but for our small company having the ability to do something like this is far greater than anyone losing an attachment or a e-mail message. I've also been able to get the Public Folder scan working. I'd be happy to send the updated Perl scripts (bear in mind it's still a work in progress) to anyone would like to take a look at it. Thanks, Jeremy Blonde From: "Koshy,Mathew,RHODES,Information Services"[EMAIL PROTECTED] To: "'Jacob, Raymond A'" [EMAIL PROTECTED], Perl-Win32-Users Mailing List [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: RE: Beautiful Code:RE: Perl MAPI attachment extraction script Date: Tue, 13 Mar 2001 16:11:15 +1100 MIME-Version: 1.0 Received: from [209.17.183.249] by hotmail.com (3.2) with ESMTP id MHotMailBC76F799D820F3ABD111B7F9F97A0; Mon Mar 12 21:13:52 2001 Received: (qmail 20131 invoked by uid 506); 13 Mar 2001 05:13:07 - Received: from localhost (HELO shot.activestate.com) (127.0.0.1) by localhost with SMTP; 13 Mar 2001 05:13:07 - Received: (qmail 20022 invoked by uid 506); 13 Mar 2001 05:12:57 - Received: from espresso.activestate.com (HELO smtp1.ActiveState.com) (192.168.2.150) by listserv1.activestate.com with SMTP; 13 Mar 2001 05:12:57 - Received: from sydsmtp01.au.nestle.com ([159.12.14.115])by smtp1.ActiveState.com (8.11.1/8.11.1) with ESMTP id f2D5CpU32309for [EMAIL PROTECTED]; Mon, 12 Mar 2001 21:12:53 -0800 Received: from sydnav01 (159.12.14.116 [159.12.14.116]) by sydsmtp01.au.nestle.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13)id G549TP5F; Tue, 13 Mar 2001 16:11:43 +1100 Received: from sydcns01.cs.au.nestle.com ([159.12.18.164]) by sydnav01 (NAVIEG 2.1 bld 63) with SMTP id M2001031316110027189 ; Tue, 13 Mar 2001 16:11:00 +1100 Received: by SYDCNS01 with Internet Mail Service (5.5.2653.19)id GYFAYSN8; Tue, 13 Mar 2001 16:11:16 +1100 From [EMAIL PROTECTED] Mon Mar 12 21:15:28 2001 Return-Path: [EMAIL PROTECTED] Delivered-To: [EMAIL PROTECTED] Message-ID: D8117A9F28E8D411B0A90002B3028258194337@SYDXIS03 X-Mailer: Internet Mail Service (5.5.2653.19) X-Filtered-By: PerlMx makes it fast and easy. See http://www.ActiveState.com/Products/PerlMx/Header Sender: [EMAIL PROTECTED] Errors-To: [EMAIL PROTECTED] X-BeenThere: [EMAIL PROTECTED] X-Mailman-Version: 2.0 Precedence: bulk List-Help: mailto:[EMAIL PROTECTED]?subject=help List-Post: mailto:[EMAIL PROTECTED] List-Subscribe: http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users,mailto:[EMAIL PROTECTED]?subject=subscribe List-Id: Discussions relating to ActivePerl on Win32 platforms perl-win32-users.listserv.ActiveState.com List-Unsubscribe: http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users,mailto:[EMAIL PROTECTED]?subject=unsubscribe List-Archive: http://mailarchive.activestate.com/browse/perl-win32-users/ David Roth's book on Win32 Perl Programming has some OLE chapters and once you get the hang of it, its pretty useful and works well. Regards Mathew Koshy -Original Message- From: Jacob, Raymond A [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 13 March 2001 10:58 To: Perl-Win32-Users Mailing List; [EMAIL PROTECTED] Subject: Beautiful Code:RE: Perl MAPI attachment extraction script Dear Jeremy: I am newbie but I must congratulate you on some well written and documented code. You should get the "$50,000" contract". This leads me to another question: I have looked at the new book by active state and the Learning Perl on Win32. Yet neither of these books has applications that I am interested in such as MAPI attachment extraction, or controlling MS Internet Explorer or the Program that Jan wrote in the Perl Journal to download T-bill information, put it in a database and email through Lotus notes. Is anyone at active state or on the list aware or planning to write a book on using perl to integrate MS Office applications(Access,Excel,Word,Outlook,IE) into one perl application? Thank you, Raymond -Original Message- From: Jeremy Blonde [mailto:[EMAIL PROTECTED]] Sent: Friday, June 09, 2000 6:49 PM To: Perl-Win32-Users Mailing List; [EMAIL PROTECTED] Subject: Perl MAPI attachment extraction script Here's a Perl script that I wrote to extract e-mail attachments from a MS Exchange server and then scan them for viruses. Apparently, MS doesn't "really" support virus scanning the Exchange info store (although I don't work on Exchange servers, so I
Re: Beautiful Code:RE: Perl MAPI attachment extraction script
Thanks! So if anyone is looking for a Perl programmer who's been known to do the impossible, let me know, I'm looking for a job. ;-) Jeremy Blonde Dear Jeremy: I am newbie but I must congratulate you on some well written and documented code. You should get the "$50,000" contract". This leads me to another question: I have looked at the new book by active state and the Learning Perl on Win32. Yet neither of these books has applications that I am interested in such as MAPI attachment extraction, or controlling MS Internet Explorer or the Program that Jan wrote in the Perl Journal to download T-bill information, put it in a database and email through Lotus notes. Is anyone at active state or on the list aware or planning to write a book on using perl to integrate MS Office applications(Access,Excel,Word,Outlook,IE) into one perl application? Thank you, Raymond -Original Message- From: Jeremy Blonde [mailto:[EMAIL PROTECTED]] Sent: Friday, June 09, 2000 6:49 PM To: Perl-Win32-Users Mailing List; [EMAIL PROTECTED] Subject: Perl MAPI attachment extraction script Here's a Perl script that I wrote to extract e-mail attachments from a MS Exchange server and then scan them for viruses. Apparently, MS doesn't "really" support virus scanning the Exchange info store (although I don't work on Exchange servers, so I apologize if my terminology is incorrect). We can't afford a $50,000 contract for a virus scanning server (and ONE year of updated signatures). So we needed a way to pull out the e-mail attachments from users mail and then scan them for viruses. Currently we don't need to put them back, although I may work on that later. I also don't have scanning Public Folders working (yet!). I use the CDO library to access the exchange mailbox and it's contents. You'll have to be on the lookout for any documentation in the script as it's pretty sparse right now (if it even exists), but it's pretty easy to follow if you know how Exchange/CDO works. Take a look at the OLE::Browser page in the ActiveState documentation for more information. Of course, I would be happy to answer any questions. I don't know if anyone would actually have a use for this or not, but I'm fairly new to Perl programming, so I'm really more interested in hearing your suggestions and/or comments about my code (I'm working on the documentation part). Here's the details: Basically, you pass the perl script the ini fle and from there it takes off. It uses a list of mailboxes (mailboxlist.txt) and tries to logon on as each username listed and then starts extracting the attachments. The INI file requires the following keys. [Settings] Mailboxlist=c:\scan\mailboxlist.txt DownloadDir=c:\scan\download Files=*.doc;*.zip; Log=c:\scan\mailscan.log Mailboxlist=c:\scan\mailboxlist.txt - A text file listing the Exchange server and mailbox username. (SERVER,USERNAME) (We wanted to split the mailbox list up and have multiple sessions run.) DownloadDir=c:\scan\download - This is where the mailbox folders and attachments will be extracted to. Files=*.doc;*.zip; - These are the file types that will be searched for. Log=c:\scan\mailscan.log - Errors, successes, failures, etc. will be logged to this file. Jeremy [EMAIL PROTECTED] ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users _ Get your FREE download of MSN Explorer at http://explorer.msn.com ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
OLE Sorts in Excel
Seems plenty of folks have asked for help in figuring out how to sort in excel. I have a similiar need, and reviewed quite a bit of code but nothing seems to work. Has anyone had success in the area? Here's a sample program of what I'm working on. In this sample the spreadsheet has values only in column A. I've tried numeous variations and have yet to hit on something that works: --- use Win32; use Win32::OLE 'with'; my $Class = "Excel.Application"; my $Excel = Win32::OLE-GetActiveObject($Class); if (! $Excel) { $Excel = Win32::OLE-new($Class, \QuitApp) || die "Could not create an OLE '$Class' object"; } $Excel-{Visible} = 1; my $File = GetFileName(); # Open the Excel File and Create Reference my $Workbook = $Excel-Workbooks-Open( $File ); # Set Active Worksheet and Create Reference my $Worksheet = $Workbook-Worksheets(1); with ( $Worksheet-Range("A1:A6")-{Sort}, Key1 = $Worksheet-Range("A1"), Order1 = xlAscending ); #with ( $Range-{Sort}, # Key1 = "A", # Order1 = xlAscending, # Header = xlNos, # OrderCustom = 1, # MatchCase = "False", # Orientation = xlTopToBottom ) ; # Close It Up, 1 = Save on Close $Excel-ActiveWorkbook-Close(1); $Excel-Quit(); exit; # sub QuitApp { my($ComObject) = @_; print "Quitting " . $ComObject-{Name} . "\n"; $ComObject-Quit(); } # sub GetFileName { my $File = $ARGV[0]; my ($xit); if ( $File ) { return($File); } $xit = 0; until ($xit) { print "\nEnter Complete Path/Filename for Excel Spreadsheet: "; $File = STDIN; chomp $File; # Test to make sure the file exists. if ( ! (-e $File) ) { print "The file you have provided does not exist.\n"; redo; } # Test to make sure the file has a valid file extension $_ = substr($File,(length($File) - 3), 3); if ( ! /xls/i) { print "The file you have provided has an invalid extension.\n"; redo; } $xit = 1; } return($File); } __ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.yahoo.com/ ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
How Can I Move My ActivePerl Install?
Hello, I have tried two times to install ActivePerl on my NT4 server and it works great, except that it always installs at the root level of drive D. What steps must I perform to ensure that my IIS server will work correctly if I move the ActivePerl files? Are there registry entries that must be changed to ensure that the suffix mappings are correctly configured when I add new sites in IIS? Thanks, Gregory Sandoval box2 technologies [EMAIL PROTECTED] / 650.938.8150 ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: How Can I Move My ActivePerl Install?
I believe that all you must do is change the PATH variable. -Mike -Original Message- From: Gregory Sandoval [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 14, 2001 9:05 PM To: [EMAIL PROTECTED] Subject: How Can I Move My ActivePerl Install? Hello, I have tried two times to install ActivePerl on my NT4 server and it works great, except that it always installs at the root level of drive D. What steps must I perform to ensure that my IIS server will work correctly if I move the ActivePerl files? Are there registry entries that must be changed to ensure that the suffix mappings are correctly configured when I add new sites in IIS? Thanks, Gregory Sandoval box2 technologies [EMAIL PROTECTED] / 650.938.8150 ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Copying hash tree
Petr Smejkal writes: I'm using quite large hash tree in my application and I need to make a copy of the root hash key - the copy not the mirror. $a{a}{b}{s} = '1'; $a{a}{c}{s} = '1'; $a{b} = $a{a}; $a{b}{b}{s} = '2'; # this line changes $a{a}{b}{s} too and that's what I want to avoid Could you reveal me the secret how to make a copy? (I don't want to go through the first hash tree recursively making the second hash tree.) I'm not entirely sure what you want, but if you are talking about deep copying or cloning, then the Storable module can help with that. Its available from the Activestate archive. -- Brian Raven There ain't nothin' in this world that's worth being a snot over. -- Larry Wall in [EMAIL PROTECTED] ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: Q* how does one determine the owner of a file?
You can use the Win32::Perms Module by Dave Roth, you can get it at http://www.roth.net/perl/perms/ example : === use Win32::Perms; use strict; my $F = new Win32::Perms('c:\\toto.txt'); my $Owner = $F-Owner(); print $Owner; $F-Close(); A+ David "Sniper" Rigaudiere Paris Perl Mongueu(r|se)s = http://paris.pm.org ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users