RE: How to edit an FTPed HTML page?
Title: RE: How to edit an FTPed HTML page? Example: Computer 1 (your computer) Script.pl |--- get file and store it in c:\temp Computer 2 (their computer) Script.pl |--- get file and store it in c:\temp I don't see why it would download to your machine unless you have a UNC path somewhere -Original Message- From: ashish srivastava [mailto:[EMAIL PROTECTED]] Sent: Friday, July 11, 2003 9:38 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: How to edit an FTPed HTML page? Hi I am able to FTP the file to any local directory on 'MY Machine'. But the application should be such that any user can FTP the file to a fixed location on HIS m/c (say C:\Temp. I will make sure that all the users have this directory on their sys.). Then he should edit it and upload it. At present when other users download the file, it is getting downloaded to my dir (say C:\temp). Ashish From: FARRINGTON, RYAN [EMAIL PROTECTED] To: 'ashish srivastava' [EMAIL PROTECTED], [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: RE: How to edit an FTPed HTML page? Date: Fri, 11 Jul 2003 09:30:14 -0500 Ashish just make sure it saves it to a local drive. Ex: c:\temp\perl_ftp\your.html -Original Message- From: ashish srivastava [mailto:[EMAIL PROTECTED]] Sent: Friday, July 11, 2003 9:04 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: How to edit an FTPed HTML page? Hi Another doubt. My script is running on a server installed on my machine. Now when i FTP a file it will be downloaded to a particualr directory. But what when other people use this script? I want the file to be downloaded to their local machines and not on my machine. How can i do this? TIA Ashish From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: How to edit an FTPed HTML page? Date: Fri, 11 Jul 2003 10:00:52 +0100 On 11/07/2003 08:13:32 perl-win32-users-admin wrote: Hi All My application needs to edit an HTML page which is located on a remote server(UNIX). I can FTP the particular file to my local directory, but can i open this file in Netscape Composer through a Perl script? Sure, system() should be able to do it: # assume file was FTPs to $localfilepath system( qq(c:/program files/netscape/netscape.exe -edit $localfilepath) ); (adjust accordingly for netscape location and the correct switch for Composer) Note: this will block your script until you exit Composer. -- Csaba Ráduly, Software Engineer, Sophos Anti-Virus Email: [EMAIL PROTECTED], Tel: 01235 559933, Web: www.sophos.com Add live virus info to your website: http://www.sophos.com/link/vfeed ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _ Astrology can be fun. Find out for yourself. http://www.msn.co.in/Astrology/Astromagic/ With just a click! ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _ Polyphonic ringtones. Latest movie trailors. http://server1.msn.co.in/sp03/gprs/index.asp On your mobile!
RE: How to edit an FTPed HTML page?
Hi I am able to FTP the file to any local directory on 'MY Machine'. But the application should be such that any user can FTP the file to a fixed location on HIS m/c (say C:\Temp. I will make sure that all the users have this directory on their sys.). Then he should edit it and upload it. At present when other users download the file, it is getting downloaded to my dir (say C:\temp). Ashish I would recommend using the File::Temp module then. It will create the file and remove it on script completion (Or any variation inbetween) and it doesn't care who is using it, it will find a unique place to store it and tell you the file name to use. I have found it very friendly for my applications needing a similar funcitonality. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Excel and empty rows.
sort the rows so that all the empty rows are at the end and the last row command would do the trick. just a thought Later, Matt -Original Message- From: Beckett Richard-qswi266 [mailto:[EMAIL PROTECTED] Sent: Friday, July 11, 2003 5:53 AM To: perl-win32-users Subject: RE: Excel and empty rows. Oops! Typos. $EmptyRow and $LastRow, should both be the same var. i.e Guys, I have sorted out what the problems are, I just don't know how to address them. I am trying to find the first empty row in a spreadsheet. If I use this suggestion: my $EmptyRow = $sheet-UsedRange-rows-count; $EmptyRow++; This points $EmptyRow to the first empty row of the spreadsheet, UNLESS the spreadsheet is totally empty. Then, the first line returns a 1, and so I write into row 2 by mistake. This suggestion: my $EmptyRow = $sheet-UsedRange-Find({What=*, SearchDirection=xlPrevious, SearchOrder=xlByRows})-{Row}; $EmptyRow++; Will again point $EmptyRow at the first empty row, UNLESS the spreadsheet is totally empty, when it causes the script to die with... Can't use an undefined value as a HASH reference at D:\PR.pl line 43, FILE line 167. Win32::OLE(0.1502) error 0x80010108: The object invoked has disconnected from its clients in METHOD/PROPERTYGET at D:\PR.pl line 119 So, either I need to be able to test for an empty spreadsheet, or I need to catch the error generated, and set the value of $EmptyRow to 0. Unfortunately, both options are beyond me. Thanks. R. PS. As an aside, why can't I do this? my $EmptyRow++ = $sheet-UsedRange-Find({What=*, SearchDirection=xlPrevious, SearchOrder=xlByRows})-{Row}; ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: [OT] Some of my posts travel slowly.
For what its' worth, I just received this at 22:25 AEST (GMT +10:00) -= -Original Message- -= From: [EMAIL PROTECTED] -= [mailto:[EMAIL PROTECTED] On -= Behalf Of Sisyphus -= Sent: Friday, 11 July 2003 9:34 PM -= To: [EMAIL PROTECTED] -= Subject: [OT] Some of my posts travel slowly. -= -= -= Hi, -= I posted to the list a post (subject 'RE:about modules') at -= 10.56am (local -= time) and the post didn't show up here until after 7.30pm - -= so it has taken over 9.5 hours. (There's another post I -= sent off at about the same time, but it hasn't arrived yet. -= I have however just received notification that it was -= unable to be delivered to [EMAIL PROTECTED] - which tells -= me it won't be too far away -= :-) ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: [OT] Some of my posts travel slowly.
Sisyphus wrote: Hi, I posted to the list a post (subject 'RE:about modules') at 10.56am (local time) and the post didn't show up here until after 7.30pm - so it has taken over 9.5 hours. (There's another post I sent off at about the same time, but it hasn't arrived yet. I have however just received notification that it was unable to be delivered to [EMAIL PROTECTED] - which tells me it won't be too far away :-) When it did arrive, it showed up in OE has having been received at 12.21pm. I'd like to know where the delay occurred and why. Is there anything in the headers that reveals this to me. I've had a look in the Properties/Details (pasted below) but it's all Greek to me. Or should I just forget about it. Just for the record, this email is being sent at at approx 11.35am GMT. Cheers, Rob Hello Rob Your message was logged into my mailbox at 12:03 gmt / 22:03 aest, about a half hour after you sent it. What follows is purely deductive guesswork on my behalf. Downloaded from your ISP mailbox to your PC by your mail client and opened by you approx 10:30 gmt / 19:30 aest (7:30pm) Return-Path: [EMAIL PROTECTED] Delivered-To: [EMAIL PROTECTED] X-Envelope-To: [EMAIL PROTECTED] Received: (qmail 25403 invoked from network); 11 Jul 2003 02:21:09 - Delivered to your mailbox (with your ISP) 2:21 gmt / 12:21 aest I think this is the received time displayed by OE. Received: from unknown (HELO listserv.activestate.com) (209.17.183.249) by mail.iinet.net.au with SMTP; 11 Jul 2003 02:21:09 - Rec'd by your ISP from listserv... 2:21 gmt / 12:21 aest Received: from listserv.activestate.com (localhost.localdomain [127.0.0.1]) by listserv.activestate.com (8.12.9/8.12.9) with ESMTP id h6B115Ql013628; Thu, 10 Jul 2003 18:01:05 -0700 Internally circulated by listserv... 18:01 pst / 1:01 gmt / 11:01 aest Received: from smtp5.ActiveState.com (sack.ActiveState.com [192.168.2.158]) by listserv.activestate.com (8.12.9/8.12.9) with ESMTP id h6B10dQl013598 for [EMAIL PROTECTED]; Thu, 10 Jul 2003 18:00:39 -0700 Rec'd by listserv... from smtp5... 18:00 pst / 1:00 gmt / 11:00 aest Received: from mail.iinet.net.au (mail-03.iinet.net.au [203.59.3.35]) by smtp5.ActiveState.com (8.12.9/8.12.9) with SMTP id h6B0xnGJ019477 for [EMAIL PROTECTED]; Thu, 10 Jul 2003 17:59:50 -0700 Rec'd by smtp5... from your ISP 17:59 pst / 0:59 gmt / 10:59 aest (envelope-from [EMAIL PROTECTED]) Received: (qmail 25831 invoked from network); 11 Jul 2003 01:01:17 - Received: from unknown (HELO sisyphusii330h) (203.220.176.75) by mail.iinet.net.au with SMTP; 11 Jul 2003 01:01:22 - Rec'd by your ISP from you 1:01 gmt / 11:01 aest Message-ID: [EMAIL PROTECTED] From: Sisyphus [EMAIL PROTECTED] To: LIBERCE D SbanStiSysDev [EMAIL PROTECTED], [EMAIL PROTECTED] References: [EMAIL PROTECTED] Subject: Re: about modules [... trimmed irrelevant headers] Date: Fri, 11 Jul 2003 10:56:55 +1000 Time you pressed the send button on your mail client 0:56 gmt / 10:56 aest Looks to me like your message didn't want to leave your mailbox. -- Regards John McMahon (mailto:[EMAIL PROTECTED]) ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Recursive design
I hate recursion. It makes my head hurt. Background: I'm working on reformating .mbox files to convert email archives to HTML and to PDA compatible text. I'm running into problems with the MIME types multipart/mixed and multipart/related. These are umbrella types that can hold an assortment of simple types, like text/plain, and image/jpg. However they can also hold other multipart types, which can happen when someone backquotes the entirety of a previous multipart message. There is also the multipart/alternative type, but these are always collections of simple types where the user agent chooses one and ignores the rest-- they are never re-entrant. My code is something like this (following is simplified to keep it short and on point): sub handleBody { my ($type, $body) = @_; my $superbody = ''; if ( $type =~ m{multipart}i ) { my ( @parts ) = splitOnBoundary($type, $body); if ( $type =~ m{alternative}i ) { # code to find the $best of the alternatives in @parts ($type, $body) = handlePart($parts[$best]) processSimpleType($type, $body); return $body; } else { # PLACE WHERE MY HEAD HURTS foreach (@parts) { $superbody .= handleBody(handlePart($_) ); } return $superbody; } } else { # handle a simple type processSimpleType($type, $body) return $body } } sub handlePart { my $part = shift; my ($head, $body) = split /^$/m, $part, 2; # treat exceptions as a type of its own: my $type = '[NONE STATED]'; if ( $head =~ m{^Content-Type: (.*)$}mi ) { $type = $1; } return ($type, $body); } Hmm, as I wrote this, I discovered the apparent need for $superbody, and I think I may have solved my logic problem. So the first of my two questions: 1) Does the above code look right? A major difficulty is that I'm dealing with archives where some of the messages aren't fully compliant with the MIME standard and I can't tell whether the bugs I've got are in the logic or because I need to tweak the regexes to handle the special cases. Which brings me to the other, more important, question: 2) Is there a better tool for designing re-entrant code other than pseudocode? How do people who do a lot of this kind of thing work out the design? -- Will ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Terminal Services
I am trying to write a logon script that will set the default printer of the client terminal by the name of the terminal. I am doing this with Win2k and citrix installed on the server, and WYSE terminals (thin clients whose sole purpose is to run ICA sessions). Has anyone already written a script to do this? I am running into difficulty getting the computer name of the terminal, not server or session. -Alex ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Foreach question.
On Fri, 11 Jul 2003, Beckett Richard-qswi266 wrote: Guys, This is one I don't know how to approach at all. I've read a text file into @lines. I then process it like this... foreach (@lines) { last if /Next section$/; next unless (/match$/); chomp; process $_; } My data is random, but in this form: A line I want data from ending in match http://some.link/ A line I don't want data from ending in something else http://some.other.link/ ... A line I do want data from, light a match http://whatever ... Next section Everything was working fine, I was pulling out the required data, and doing what I wanted with it. Unfortunately, now they've decided that they want me to process the url on the next line as well as the first line, but only provided the line before matches. I have no idea where to start with this. Is it possible to pull 2 lines at a time from @lines, or something? Sure, just to a : $second_line=shift(@lines) ; when the first line matches. But in gereral, it's not good technique to read all the lines into an array so that you can work on each line. Instead just loop reading a single line, e.g. while(FH) { and then when you find a match you can do: $second_line=FH; [EMAIL PROTECTED] Carl Jolley All opinions are my own and not necessarily those of my employer ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Adding Perl 5.6.1 to RH Linux 9 that already has Perl 5.8 installed.
- Original Message - From: Joe Flowers [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, July 11, 2003 9:38 AM Subject: Adding Perl 5.6.1 to RH Linux 9 that already has Perl 5.8 installed. I have a Red Hat Linux 9 machine that has Perl 5.8 installed on it, and Perl 5.8 on this machine looks deeply embedded to the core of the OS, based on the ton of dependencies when I do rpm -e perl. I need to run SpamAssassin on this machine, but the SpamAssassin docs highly recommends using Perl 5.6 and NOT Perl 5.8. *Is there anyway I can install Perl 5.6.1 for use by SpamAssassin only, so I can leave Perl 5.8 for the OS and everything else?* I'm afraid trying to uninstall Perl 5.8 on this machine, besides having a hundred depending packages to uninstall first, and then to re-install after back revving Perl, will leave the OS in an unstable state. Any ideas? Perl is, after all, just an executable - and there's no problem with having multiple executables with the same name on the same box. It's just a matter of ensuring that you call the appropriate one - which I think can be taken care of with the shebang line on Linux (but not on Windows). When you build 5.6, just configure the makefile to have it installed somewhere else. At least that's all that's required on windows .. and this *is* a win32 list :-) Cheers, Rob ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Recursive design
As usual, its been done before. Look at the modules which support SpamAssassin, and particularly MIME-Tools. Get them from CPAN :-) - Original Message - From: Will of Thornhenge [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 11, 2003 5:38 PM Subject: Recursive design I hate recursion. It makes my head hurt. Background: I'm working on reformating .mbox files to convert email archives to HTML and to PDA compatible text. I'm running into problems with the MIME types multipart/mixed and multipart/related. These are umbrella types that can hold an assortment of simple types, like text/plain, and image/jpg. However they can also hold other multipart types, which can happen when someone backquotes the entirety of a previous multipart message. There is also the multipart/alternative type, but these are always collections of simple types where the user agent chooses one and ignores the rest-- they are never re-entrant. My code is something like this (following is simplified to keep it short and on point): sub handleBody { my ($type, $body) = @_; my $superbody = ''; if ( $type =~ m{multipart}i ) { my ( @parts ) = splitOnBoundary($type, $body); if ( $type =~ m{alternative}i ) { # code to find the $best of the alternatives in @parts ($type, $body) = handlePart($parts[$best]) processSimpleType($type, $body); return $body; } else { # PLACE WHERE MY HEAD HURTS foreach (@parts) { $superbody .= handleBody(handlePart($_) ); } return $superbody; } } else { # handle a simple type processSimpleType($type, $body) return $body } } sub handlePart { my $part = shift; my ($head, $body) = split /^$/m, $part, 2; # treat exceptions as a type of its own: my $type = '[NONE STATED]'; if ( $head =~ m{^Content-Type: (.*)$}mi ) { $type = $1; } return ($type, $body); } Hmm, as I wrote this, I discovered the apparent need for $superbody, and I think I may have solved my logic problem. So the first of my two questions: 1) Does the above code look right? A major difficulty is that I'm dealing with archives where some of the messages aren't fully compliant with the MIME standard and I can't tell whether the bugs I've got are in the logic or because I need to tweak the regexes to handle the special cases. Which brings me to the other, more important, question: 2) Is there a better tool for designing re-entrant code other than pseudocode? How do people who do a lot of this kind of thing work out the design? -- Will ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Foreach question.
Whenever I need matches over multiples lines I generally read the text into one string (assuming its not too large) and then just match over newlines: $foo = some input text with newlines... @matches = $foo =~ /some pattern/sg; read up on the modifiers (s will match newlines), adjust your patten and you should be set. - Original Message - From: Beckett Richard-qswi266 [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 11, 2003 10:19 AM Subject: Foreach question. Guys, This is one I don't know how to approach at all. I've read a text file into @lines. I then process it like this... foreach (@lines) { last if /Next section$/; next unless (/match$/); chomp; process $_; } My data is random, but in this form: A line I want data from ending in match http://some.link/ A line I don't want data from ending in something else http://some.other.link/ ... A line I do want data from, light a match http://whatever ... Next section Everything was working fine, I was pulling out the required data, and doing what I wanted with it. Unfortunately, now they've decided that they want me to process the url on the next line as well as the first line, but only provided the line before matches. I have no idea where to start with this. Is it possible to pull 2 lines at a time from @lines, or something? Thanks. R. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Excel and empty rows.
On Fri, 11 Jul 2003, Beckett Richard-qswi266 wrote: Guys, I have sorted out what the problems are, I just don't know how to address them. I am trying to find the first empty row in a spreadsheet. If I use this suggestion: my $EmptyRow = $sheet-UsedRange-rows-count; $EmptyRow++; This points $LastRow to the first empty row of the spreadsheet, UNLESS the spreadsheet is totally empty. Then, the first line returns a 1, and so I write into row 2 by mistake. This suggestion: my $EmptyRow = $sheet-UsedRange-Find({What=*, SearchDirection=xlPrevious, SearchOrder=xlByRows})-{Row}; $EmptyRow++; Will again point $LastRow at the first empty row, UNLESS the spreadsheet is totally empty, when it causes the script to die with... Can't use an undefined value as a HASH reference at D:\PR.pl line 43, FILE line 167. Win32::OLE(0.1502) error 0x80010108: The object invoked has disconnected from its clients in METHOD/PROPERTYGET at D:\PR.pl line 119 So, either I need to be able to test for an empty spreadsheet, or I need to catch the error generated, and set the value of $LastRow to 0. Unfortunately, both options are beyond me. For an empty spreed sheet, it _may_ be that the UsedRange property is undefined. That seems both logical a reasonable to me. It that is correct then you could check for this condition by: if (ref($sheet-UsedRange) eq Win32::OLE) { # sheet not empty .. .. } else { $EmptyRow=1; } [EMAIL PROTECTED] Carl Jolley All opinions are my own and not necessarily those of my employer ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Recursive design
Roger C Haslock wrote: As usual, its been done before. Look at the modules which support SpamAssassin, and particularly MIME-Tools. Get them from CPAN :-) Ah! Good point-- I can maybe study out how Eryq managed this problem in MIME-Tools. Unfortunately, I can't use MIME-Tools directly with the data sets I'm working with. Some of the older files, from around 1996, appear to have been reprocessed in bad ways (or maybe the messages were generated by software that didn't do MIME right). Anyway, they've got a scattering of malformed headers and broken encodings, and I think I'm better off rolling my own simple routines in this situation. Besides, maybe I'll learn something. -- Will ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Recursive design
From: Will of Thornhenge [mailto:[EMAIL PROTECTED] Besides, maybe I'll learn something. I've heard that before, usually coming out of my own mouth. hope you're stocked up on caffeine =) ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
ucfirst lc question
Hi there, I was hoping someone could come up with an efficient way of doing a ucfirst lc on each word in the block below: 1{0e}TRUE DREAM{0e}6-1{0e}{0e}4{0e}SP'S SLIM SHADY{0e}10-1/l 2{0e}HARLEIGH GIRL{0e}8-1{0e}{0e}5{0e}FLYING SWEET AMY{0e}8-1/l 3{0e}REKO THEODORE{0e}7-2{0e}{0e}6{0e}MOON MT CHEETAH{0e}5-2/l 4{0e}SP'S SLIM SHADY{0e}10-1{0e}{0e}8{0e}JUST SO YOU KNOW{0e}9-2/l I could do the following: push (@ucwords, split(/\w+/, $block)); Then do a foreach $word, ucfirst lc($ucword), push them into @lcwords, and then loop through both arrays searching for each $ucword and replacing with $lcword. Is there a more efficient way of doing this? Thanks in advance, -Erich- ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Using glob
Is it possible to do a glob on a directory and get a list of files with a certain extension( *.txt ) and also for a specific modification time? I'm current doing: my @file_list=glob(c:\\rawdata\\*.txt); But I only want to get files modified on a certain date. Jeff ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Status of PerLDAP under perl 5.8
Title: Status of PerLDAP under perl 5.8 I recently upgraded to ActiveState build 806 (perl v. 5.8.0) and fortunately I kept a copy of build 633 (perl v. 5.6.1) lying around. Fortunately because I, and my co-workers, have made extensive use of the PerLDAP package under build 633. It appears that PerLDAP is not available for build 806, and I can't use perldap.ppm from build 633 to install it for build 806. Does anyone know the current status of PerLDAP? Thanks in advance!
Re: ucfirst lc question
On 2003.07.11 12:32 Erich C. Beyrent wrote: Hi there, I was hoping someone could come up with an efficient way of doing a ucfirst lc on each word in the block below: 1{0e}TRUE DREAM{0e}6-1{0e}{0e}4{0e}SP'S SLIM SHADY{0e}10-1/l 2{0e}HARLEIGH GIRL{0e}8-1{0e}{0e}5{0e}FLYING SWEET AMY{0e}8-1/l 3{0e}REKO THEODORE{0e}7-2{0e}{0e}6{0e}MOON MT CHEETAH{0e}5-2/l 4{0e}SP'S SLIM SHADY{0e}10-1{0e}{0e}8{0e}JUST SO YOU KNOW{0e}9-2/l $block =~ s/([A-Z']+)/ucfirst lc $1/eg; 1{0e}True Dream{0e}6-1{0e}{0e}4{0e}Sp's Slim Shady{0e}10-1/l 2{0e}Harleigh Girl{0e}8-1{0e}{0e}5{0e}Flying Sweet Amy{0e}8-1/l 3{0e}Reko Theodore{0e}7-2{0e}{0e}6{0e}Moon Mt Cheetah{0e}5-2/l 4{0e}Sp's Slim Shady{0e}10-1{0e}{0e}8{0e}Just So You Know{0e}9-2/l Note that this turns SP'S into Sp's. If you can do without the ', you would probably get prettier output. Randy -- Randy J. RayCampbell, CAhttp://www.rjray.org[EMAIL PROTECTED] Silicon Valley Scale Modelers: http://www.svsm.org ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Excel and empty rows.
I am tring to align the test in the cell but it no workie and it is driving me nuts $RangeValue = J1; $Alignment = xlCenter; $Working_Alignment = $Book-Worksheets($SHEET_NAME); $Working_Alignment -Range($RangeValue)-{HorizontalAlignment} = $Alignment; I get this error and I do not know why? Unable to set the HorizontalAlignment property of the Range class Win32::OLE(0.1603) error 0x80020009: Exception occurred in PROPERTYPUT HorizontalAlignment at D:/apps/XML_2_EXCEL_DRIVER/v001.004/ Modules/proc_data.pm line 306 ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Excel Cell Value Alignment
Sorry forgot to change the label I am tring to align the test in the cell but it no workie and it is driving me nuts $RangeValue = J1; $Alignment = xlCenter; $Working_Alignment = $Book-Worksheets($SHEET_NAME); $Working_Alignment -Range($RangeValue)-{HorizontalAlignment} = $Alignment; I get this error and I do not know why? Unable to set the HorizontalAlignment property of the Range class Win32::OLE(0.1603) error 0x80020009: Exception occurred in PROPERTYPUT HorizontalAlignment at D:/apps/XML_2_EXCEL_DRIVER/v001.004/ Modules/proc_data.pm line 306 ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Excel Cell Value Alignment
Sorry forgot to change the label I am tring to align the test in the cell but it no workie and it is driving me nuts $RangeValue = J1; $Alignment = xlCenter; $Working_Alignment = $Book-Worksheets($SHEET_NAME); $Working_Alignment -Range($RangeValue)-{HorizontalAlignment} = $Alignment; Almost, try this: use Win32::OLE; use Win32::OLE::Const 'Microsoft Excel'; my $Excel = Win32::OLE-GetActiveObject('Excel.Application') || Win32::OLE-new('Excel.Application'); $Excel-{'Visible'} = 1;#0 is hidden, 1 is visible $Excel-{DisplayAlerts}=0;#0 is hide alerts # Open new Worksheet $Excel-{SheetsInNewWorkBook} = 1; my $Book = $Excel-Workbooks-Add(); my $Sheet = $Book-Worksheets(1); $Sheet-Activate(); my $range = 'A1'; $Sheet-Range($range)-{Value} = 'abc'; $Sheet-Range($range)-Interior-{ColorIndex} = 27; $Sheet-Range($range)-Font-{FontStyle}=Bold; $Sheet-Range($range)-{HorizontalAlignment} = xlHAlignCenter; $Sheet-Range($range)-Font-{Underline} = xlUnderlineStyleSingle; # or $Sheet-Range($range)-Font-{Underline} = 2; sleep(5) -- Nathaniel G. Bartusiak TTMS, Keesler AFB ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Status of PerLDAP under perl 5.8
perl-ldap 0,29 works well under perl 5.8. I couldn't find a PPD, so I installed it using CPAN. According to http://perl-ldap.sourceforge.net/FAQ.html you don't even need a compiler (download and extract it manually and run 'perl install-nomake'). Didn't have any trouble with the install until I tried to get it working with openssl. Levner, David [JJCUS Non JJ] [EMAIL PROTECTED] 7/11/2003 2:01:36 PM I recently upgraded to ActiveState build 806 (perl v. 5.8.0) and fortunately I kept a copy of build 633 (perl v. 5.6.1) lying around. Fortunately because I, and my co-workers, have made extensive use of the PerLDAP package under build 633. It appears that PerLDAP is not available for build 806, and I can't use perldap.ppm from build 633 to install it for build 806. Does anyone know the current status of PerLDAP? Thanks in advance! ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
AW: Problem Using 'unlink' within Script
On Fri, 11 Jul 2003 10:16:46 +0200, [EMAIL PROTECTED] wrote with regard to: AW: Problem Using 'unlink' within Script: I think, the problem is: the difference between the end write of a file, and the time in the file to the system is known (and the system the access through). If I write a big file on a remote computer and question immediately afterwards on the byte number of this file in a loop, I get with every flow a number which becomes bigger and bigger. The time up to the end grow is from 0 up to some seconds. In this time the file is not ready for unlink and rename. If I end the perl-script and open a new the file is ready for unlink and rename ! ? ? I believe 5 seconds wait is not enough for a distant computer slowly to be reached. I have files which can also not unlink after 10 seconds. Mit freundlichen Grüssen Joachim Görner A reasonable hypothesis! Can anyone verify it? ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs