Re: Editor - finding lines

2004-05-27 Thread Lee Goddard
Capacio, Paula J wrote:
TextPad has a search across all open documents, or all files 
in a directory.  The results are shown in a separate window and
double clicking the result takes you to that section of code in 
that file.  
Again like UltraEdit it's not free, but in the same price range.
It also has color syntax highlighting for perl and you can set up 
the tools to execute perl from within the editor.
http://www.textpad.com
Paula 

You can also supply a regex so that the output TP collects
from a command (Perl, Java, C) is hyperlinked by filename/line number.
So clicking "error at X.pm, line 10" takes you there.
Another useful one is CTRL+M over a bracket (brace/angel-bracket, etc)
to find the matching pair
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: message replies

2003-12-18 Thread Lee Goddard
$Bill Luebkert mailto:[EMAIL PROTECTED] wrote on Thursday, December 18, 2003 3:02 AM:

| I agree - never use M$ email clients.  Also a good way to pick
| up viruses.

Quite, but of course not all of use can decide what we use in our offices. 

lee

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.529 / Virus Database: 324 - Release Date: 16/10/2003
 

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: parsing text

2003-12-10 Thread Lee Goddard

Nice idea: I'm surprised it's not been done before
(I didn't look on CPAN ...)

Just a thought, fwiw: if you are sure there will be
no spaces in your "leaders" - the bit between the
row name and the data (...) - and if you can be sure
that each column consists of data without white space
then you could surely use a regular expression to 
get at the data?

You $text string does have a row (number 6) with
a space in the leader: but maybe you get around
that by requiring a column to have white space on
either side...?

Just a thought.
lee

-Original Message-
From: Joe Youngquist [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 09, 2003 9:58 PM
To: [EMAIL PROTECTED]
Subject: parsing text


Hello list,

I've been trying to figure out a generalized method of parsing space formatted text to 
outout into html tables.  The data is verly likely written out using Perl Reports and 
Pictures, has anyone come up with a general method?

Here's a few examplesof the text that I'd format to html tables:

NOTE: Best to use Courier New font to keep the formatting


|-OVERALL STATISTICS--|
TOTALS   O-REB D-REB TOTAL   PF  FOA   TO  A/TO Hi Pts 
---
Lowe, Kenneth... 01515   15   0   14   11   1.3 26
Teague, David... 616229   094   2.2 19
Booker, Chris...1321348   0   10   10   1.0 20
Buckley, Melvin. 51722   11   0   108   1.2 20
McKnight, Brandon... 11112   15   1   18   15   1.2 13
Buscher, Brett.. 1 910   15   099   1.0 10
Kartelo, Ivan...221941   14   027   0.3 12
Kiefer, Matt 91221   14   049   0.4  7
Parkinson, Austin... 3 5 84   0   207   2.9  8
Nwankwo, Ije 2 2 42   022   1.0  2
Carroll, Matt... 1 3 46   002   0.0  2
Ford, Andrew 0 1 12   001   0.0  0
Garrity, Kevin.. 0 1 10   000   0.0  0
Hartley, Chris.. 1 0 10   001   0.0  0
Total...72   143   215  115   1   98   86   1.1 78
Opponents...72   130   202  131   -   62  103   0.6 68

   TEAM STATISTICS PUR  OPP
   
   SCORING...  431  352
 Points per game. 71.8 58.7
 Scoring margin..+13.2-
   FIELD GOALS-ATT...  142-328  134-336
 Field goal pct.. .433 .399
   3 POINT FG-ATT   36-10225-99
 3-point FG pct.. .353 .253
 3-pt FG made per game...  6.0  4.2
   FREE THROWS-ATT...  111-14759-99
 Free throw pct.. .755 .596
   REBOUNDS..  215  202
 Rebounds per game... 35.8 33.7
 Rebounding margin... +2.2-
   ASSISTS...   98   62
 Assists per game 16.3 10.3
   TURNOVERS.   86  103
 Turnovers per game.. 14.3 17.2
 Turnover margin. +2.8-
 Assist/turnover ratio...  1.1  0.6
   STEALS   44   31
 Steals per game.  7.3  5.2
   BLOCKS   23   23
 Blocks per game.  3.8  3.8
   WINNING STREAK6-
 Home win streak.3-
   ATTENDANCE3311823435
 Home games-Avg/Game.  3-11039  0-0
 Neutral site-Avg/Game...-   3-7812

   BY PERIOD 1st  2ndTotal
      
   Team  203  228  -   431
   Opponents...  164  188  -   352


The goal I'm trying to reach is to build a method that no matter the table of data 
sent to it, will find where the columns are for the data.  It's easy to "see" where 
the columns are, but my attempt to tell a program how to "see" the columns has been 
embarrising to say the least.

The road I was walking down was to take each line of a table and look for spaces 
(skipping dashes and pipes) when one is found, look "down" the rest of the table in 
this current column with the space.  If all the way "down" the table are spaces (or a 
dash or pipe) then there is likely a column boundry at this column location.  On

WinAmp Win32 Network?

2003-12-03 Thread Lee Goddard
Is it possible to check what is playing on WinAmp across an intranet, as well as to 
start tracks playing?

A new area to me, any advice appreciated:

Lee

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.529 / Virus Database: 324 - Release Date: 16/10/2003
 

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Perl Mir-reporting line numbers and errors

2003-10-22 Thread Lee Goddard

Please help. 

Perl is reporting non-existant errors, and attributing them
to incorrect lines which bear no relation tot he reported issue.

I saw this once before, and I think it had something to do
with spcing around "elsif" clauses  has nnyone ANY ideas?

Thanks in anticipation
lee

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


${foo} not $foo

2003-10-16 Thread Lee Goddard
| Lee Goddard wrote:
| >
| > Has anyone any idea why this might appear 
| > in some perl code?
| > 
| > warn ${line};
| > 
| > Why not just $line?
| 
| Hi Lee.
| 
| No reason, except that it may be site coding standards?

Apparently, according to the author's copy of Learning Perl,
it is the fastest way of getting a scalar evaluated
when was that, back in 1980?  

I'll have to make time to run Benchmark on that

lee

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: (no subject)

2003-10-16 Thread Lee Goddard
| Lee Goddard wrote:
| >
| > Has anyone any idea why this might appear 
| > in some perl code?
| > 
| > warn ${line};
| > 
| > Why not just $line?
| 
| Hi Lee.
| 
| No reason, except that it may be site coding standards?

Turns out the guy thought it was faster for string interpolation.
He misread Learning Perl, where (pp 44) it talks about embedded
$foo in the middle of a string "Totally ${foo}ed up" -- slower
than "totally $foo"."ed up", I guess.

thanks
lee

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


(no subject)

2003-10-16 Thread Lee Goddard
Has anyone any idea why this might appear 
in some perl code?

warn ${line};

Why not just $line?

Thanks for your thoughts
lee 

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: converting files (text)

2003-10-15 Thread Lee Goddard
| Are there any module(s) that would allow me to convert
| plain text, rtf, Star Office, Microsoft, etc files
| from one format to another via scripting?

There are at least some to allow you to manipulate them:
try typing the file type (rtf, html) into search.cpan.org.

| What I would like to do is to allow my web users to
| upload in a format and then allow other users to
| download in their preferred format. Either by making
| copies on the server or converting them on the fly on
| download.

RTF manipulation is the RTF modules is pretty nice but 
pretty basic - no images. The RTF table model is ugly
so HTML->RTF is a pain, but vice-versa should be easy
enough.

The PDF::API2 modules are great - well worth a look.

HTML::TokeParser is easy to learn.

There are plenty of modules to pretty-print text, too.

hth
lee

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: DBI on microsoft

2003-10-15 Thread Lee Goddard



Sorry 
about the HTML : I didn't start it.
 
DBI is 
just a Data-Base Interface: you need to know what database
you 
have, then get a Data-Base Driver (DBD) module for it from
CPAN. 
On Windows, try ppm DBD::xxx where xxx si the database name.
 
Like, 
what database are you using?
You 
might find the activestate win32 perl db list more 
responsive.
 
lee
 

  -Original Message-From: Mundell, R. (Ronald) 
  [mailto:[EMAIL PROTECTED]Sent: Wednesday, October 15, 2003 11:53 
  AMTo: 
  '[EMAIL PROTECTED]'Subject: DBI on 
  microsoft
  
  Good Day All
   
  Does anyone knows how to get DBI 
  working on Microsoft or where I can get a copy of it for MS
   
   


Re: Spreadsheet-like data entry/editing in PerlTk?

2003-09-30 Thread Lee Goddard
Have a look in the TK demo directories at the
widget demos: I seem to remember there's one
that does almost what you want.
Failing that, try the tk usenet group.

hth
lee
At 14:37 30/09/2003, Alan Dickey wrote:
"Dax T. Games" wrote:
>
> Does anyone know of a Tk widget or have some sample code that would
> allow data entry and editing like with a spreadsheet in PerlTk.
try perldoc Tk::Entry



Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
Probald ki most! http://www.freestart.hu
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Date conversion

2003-09-29 Thread Lee Goddard
Swap 03 with 20 and you can use
the quite lightweigth Date::Simple.
At 09:17 29/09/2003, $Bill Luebkert wrote:
Noushad Dawood wrote:

> Friends...need help on converting a date read from csv file. What i need is
> to convert 20-Sep-03 to 20030920. Is there any function to do this?
Just brute force it.  EG:

use strict;

my %mons = (JAN => 0, FEB => 1, MAR => 2, APR => 3, MAY => 4, JUN => 5,
  JUL => 6, AUG => 7, SEP => 8, OCT => 9, NOV => 10, DEC => 11);
my $date = '20-Sep-03';
my @d = split /-/, $date;
my $newdate = sprintf "%04u%02u%02u", 2000+$d[2], $mons{uc $d[1]}+1, $d[0];
print $newdate, "\n";
--
  ,-/-  __  _  _ $Bill LuebkertMailto:[EMAIL PROTECTED]
 (_/   /  )// //   DBE CollectiblesMailto:[EMAIL PROTECTED]
  / ) /--<  o // //  Castle of Medieval Myth & Magic 
http://www.todbe.com/
-/-' /___/_<_http://dbecoll.tripod.com/ (My Perl/Lakers stuff)

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
Probald ki most! http://www.freestart.hu
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: AmphetaDesk and old Win32 Bugs - RFHelp

2003-09-26 Thread Lee Goddard
At 04:48 24/09/2003, Morbus Iff wrote:

Hey all. I'm attempting to clear up two old Win32::GUI bugs reported long
ago with my AmphetaDesk application [1]. Could someone take a look at the
original bug report and my followups [2], and then my Win32 code [3]:
http://cvs.sf.net/cgi-bin/viewcvs.cgi/amphetadesk/AmphetaDesk/lib/AmphetaDesk/OS/Windows.pm?rev=1.13&content-type=text/vnd.viewcvs-markup

And see if there's any places I can fix 'em? Or, at least,
more information with which to update the original report?
[1] http://disobey.com/amphetadesk/
[2] http://sf.net/tracker/?func=detail&aid=584675&group_id=21649&atid=372519
Cool - I've been meaning to write something like this
since before there were CNN channels and it wasn't
worth doing. Great program!
One of your listed issues is:

  - Follow the Win standards. Tray icons open app on
double click, not single click.
This is not an issue, at least here on Win2k:

In the file ~/OS/Windows.pm, about line 349, you have:

# if the systray icon is clicked, re-enable the window. we have
# to do this as a _MouseEvent as opposed to _DblClick due to
# _DblClick not being supported on a NotifyIcon. The $event
# id is one seven: 512 => 'Mouse Move', 514 => 'Left Click',
# 515 => 'Left DoubleClick', 517 => 'Right Click', 518 =>
# 'Right DoubleClick',519 => 'Middle Down', and 520 => 'Middle Up'.
# Thanks to Joe Frazier, Jr. for this information.
sub AmphetaDesk::OS::Windows::_Systray_MouseEvent {
my $event = shift; if ($event == 515) { $window->Enable; 
$window->Show; }
}

As for the second issue:
  - Something strange. Cursor doesn't refresh from I-
  beam to arrow when I mouseout from the log text to
  other part of the ampheta GUI.
I don't know Win32::GUI, don't have it here, and am
behind a little modem in Hungary, so sorry: but, since
you don't seem to specify the cursor for the log text area,
can you not (hack) specify it for other areas, or link
a mouse-out event for the log area to re-set the curor?
Once again, this is a very, very nice things - THANKS.

Thanks
Lee  


Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
Probald ki most! http://www.freestart.hu
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Parsing Excel file

2003-09-23 Thread Lee Goddard
I've never used Excel so I'd use DBI and DBD::CSV to do it.
The mod's got an Excel example included.
Or Text::CSV_XS. But maybe now's a good time to learn Excel OLE.
At 16:34 23/09/2003, Greg Wardawy wrote:
Hello all,
I'm not a big fan of Excel files so I was always saving them as csv files 
before working on the data. Well, it got me two days ago, I tried my old 
ways and wasn't able to find the right one and I need your advice.
Here is the situation:
1. I have an Excel file in format like below (sorry about that, it doesn't 
look good pasted into the email)
2. I have to get rid of the last 5 columns (sure, I can delete them in 
Excel but that wouldn't be the Perl way)
3. I have to split the second column (Note) into three columns (Date, Time 
and Note) getting rid of *** and having the note in one line, some or all 
data can be missing
4. The output data should be in the following format:

Customer,Date,Time,Note
18 International
3 M,8/6/03,,PER S.J. NOTES SD PROMISED PYMT 8/8/03. OT
3 M,9/4/03,12:13P,CLD BUYERS V/ML LMTCB WENT BCK TO OPER AND LFT MESS ON 
GENERAL MESS GOT V/ML LMTCB. OT
3 M,9/8/03,9:51A,"CLD SPK TO BUYER SD PYMT WAS SMMTD FOR PYMT TO A/P OVER 
A MNTH AGO AND SD WE ND TO CL ROSA ESPIRIZUTA 512-984-7769 CLD SD CK# 
391663 WAS MLD 9/2/03 AND IT'S COMING FROM MN., ADVSD IF DON'T RCVD BY 
9/11/03 WLCB." OT
3-D Fire Protection

Can somebody push me in the right direction? Does saving this file as a 
csv and fighting with data in this format make sense?
I just installed Spreadsheet-ParseExcel and Spreadsheet-ParseExcel-Simple 
modules. Any advice here? I have no experience at all on using them.
Any advice is greatly appreciated.
Thanks a lot.

Greg



Customer Note Phone Numbers Email Full Name Billing Address Shipping Address
18 International   Phone: (212) 586-8863
Fax: (212) 262-4030   Mr. Tim Longdale 666 Fifth Avenue
New York NY 10103
USA
3 M 8/6/03 PER S.J. NOTES SD PROMISED PYMT 8/8/03. OT***
9/4/03 (12:13P) CLD BUYERS V/ML LMTCB WENT BCK TO OPER AND LFT MESS ON 
GENERAL MESS GOT V/ML LMTCB. OT***

9/8/03 (9:51A) CLD SPK TO BUYER SD PYMT WAS SMMTD FOR PYMT TO A/P OVER A 
MNTH AGO AND SD WE ND TO CL ROSA ESPIRIZUTA 512-984-7769 CLD SD CK# 391663 
WAS MLD 9/2/03 AND IT'S COMING FROM MN., ADVSD IF DON'T RCVD BY 9/11/03 
WLCB. OT*** Phone: (512) 984-6513
Fax: (512) 984-6867   Bill McDaniel 6801 Riverplane Blvd.
Austin TX 78726
USA
3-D Fire Protection   Phone: (208) 525-8577
Fax: (208) 525-8381   Mr. Lamar Hayward P.O. Box 50845
Idaho Falls ID 83405-0845
USA



Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
Probald ki most! http://www.freestart.hu
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


The Unofficial Perl Win32 Users Flameware/Mega-Thread FAQ

2003-09-23 Thread Lee Goddard
It's that time of year again: please allow me
to present the *Unofficial* Flameware/Mega-Thread
FAQ, posting II:
 Feel like a bit of a tussle?

 Feel like avoiding one?

 Here's a handy cut-out-and-keep list of favourite
 fighting-talk subjects for this list:
 * HTML e-mail and your right to choose.
 * What editor should I use for Perl?
 * How do I install a module?
 * Can you do my homework for me?
 * Can you do my day job for me?
 * How do I program Perl without reading anything at all?
 * Perl is , isn't it?
 * Why Java is better than Perl.
 * Microsoft married ActiveState: what about the children?
 * Off-topic conversations: your right to delete mails.
 * Spam and mail headers
 * Please will you unsubscribe me?
 * Testing.
 More to come, friends.

 Lee
 ---
 Obligatory perl schmutter .sig:
 perl -e "print chr(rand>.5?92:47) while 1"

Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
Probald ki most! http://www.freestart.hu
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: [perl-win32-users] unvailable for a moment

2003-09-23 Thread Lee Goddard
Yes, it was a silly question :)
Look at the bottom of your own message;
or - as always - check the mail headers.
hth
lee
At 09:55 23/09/2003, theatre wrote:

hi,



is there anyone who can tell me how to unsuscribe ?

yes, I know, it is stupid as a question,

but my machine has crashed ... and I have lost lots of my data ... so I 
need a break.



please, help,

alain.



Message du 23/09/03 03:55
De : Will of Thornhenge
A : [EMAIL PROTECTED]
Copie à :
Objet : Re: Perl editors
Beckett Richard-qswi266 wrote:
> What's the best text editor for perl?
>
>
>
> R. (Trying to keep a straight face).
>
>
>>Just ask "what's the best text editor for perl" and
>>you'll see :)
I use Ultra-Edit. For all my text processing needs. And so for Perl, too.

Oh, I have the occasional fling with other text editors (hmm, time to
dance crimson around the floor again), but I keep coming back to UE.
I've got a little invested in macros and templates with UE.
--
Will Woodhull
[EMAIL PROTECTED]
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
Probald ki most! http://www.freestart.hu
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: newbie hlelp!

2003-09-20 Thread Lee Goddard
At 02:59 19/09/2003, Carl Jolley wrote:

You probably won't find "horizontal bar" either but that's probably what
Lee calls a dash. (:-D)
Oooo, you!  Hyphen, actually: a dash is longer.
Unless it's an n-dash, but even then, a dash has space
either side
Lee "Pendant" Goddard 


Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
Probald ki most! http://www.freestart.hu
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Controls for Perl?

2003-09-20 Thread Lee Goddard
At 22:16 19/09/2003, Doug Loud wrote:
Are there any controls available for perl, such as list boxes, etc, so 
that my users could click on an icon and have a perl populated list box 
appear for their choices/selection?  Or do I have to do it through a web 
browser page like I used to?
Since this is perl, there's no one way of doing it.
Most people seem to use Tk, since it'll work on
most (all?) platforms. There's a Win32::GUI module,
with obvious limitations. Personally, I find an HTML
GUI suffices most of the time, but it naturally
depends upon your specific situation.



Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
Probald ki most! http://www.freestart.hu
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


OT RE: newbie hlelp!

2003-09-20 Thread Lee Goddard
At 10:22 19/09/2003, Beckett Richard-qswi266 wrote:

Mind you I bet suspenders are something different in the US.
I fear in the US men wear them to keep their
trousers up. Call me old-fashioned, but I
think they're missing out there.

Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
Probald ki most! http://www.freestart.hu
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Semantics, not a troll (was newbie hlelp!)

2003-09-20 Thread Lee Goddard
At 21:42 19/09/2003, Arms, Mike wrote:
Lee Goddard [EMAIL PROTECTED]) wrote:
> ... I didn't mean to start
> a flame war here: I only do that if someone asks
> about text editors.
Nah, I haven't seen any flames. Just a lot of good
humor. Been a fun topic.
Just ask "what's the best text editor for perl" and
you'll see :)

Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
Probald ki most! http://www.freestart.hu
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Semantics, not a troll (was newbie hlelp!)

2003-09-20 Thread Lee Goddard
At 22:41 19/09/2003, $Bill Luebkert wrote:
Lee Goddard wrote:
> At 18:15 18/09/2003, $Bill Luebkert wrote:
>
>>Dictionary definitions are indented after each symbol pair:
>
>
> Which one?  An...American dictionary?
> Schock horror: they were only invented to
> be different, annoy the Brits and invent a
> US identity! (A bit off-topic there, though I
> could go on, it'd have to be somewhere dubious
> like alt.postmodern and I swore never to return.)
>
> FWIW, from a real dictionary of the English language:
This is exactly why we should all use the American definitions.  We have
individual names that apply to each symbol so you can't muck up and get
the wrong one.
Now who's trolling?!

To coin a phrase, there's more than one way to name it.
I haven't seen a poster being unclear on this, so we'll
survive, I guess, and when in doubt, adding a description
of the shape helps; kind of child-like, but so was
Paul Klée.
lee




Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
Probald ki most! http://www.freestart.hu
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: newbie hlelp!

2003-09-18 Thread Lee Goddard
At 19:18 17/09/2003, you wrote:
Lee Goddard wrote:

> Brackets, parenthesis, the terms change over the Atlantic:
> that's just pedantry, Bill :)
That's just bull, Lee. :)  If you can't have common terminology,
how can you have a reasonable discussion about programming which
requires explicit terminolgy ?
Did/do you say braces or square brackets?
Did you specify the style of parenthesis:
looked to me like the significance was as
implicit in your sentence as mine.
How about:

  () - plain/round parenthesis/brackets
  [] - square parenthesis/brackets
  {} - curly parenthesis/brackets, set delimiters (maybe not)
  <> - angle brackets; greater-/less-than
Really, though, bull aside, do you Yankees really
think () are not brackets?  Or [] aren't?
>> $file[9], why doesn't @{ stat($file) }[9] work?
>
> I don't mean to argue, I really am curious.
I'm guessing that is forcing a scalar context for 'stat($file)' when you
need a list context.
Could be. I really ought to invest in looking at the
source for this thing...
Cheers!
Lee

Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
Probald ki most! http://www.freestart.hu
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: How to launch Internet Explorer from perl script ?

2003-09-18 Thread Lee Goddard
Maybe not exactly what you want, but it's fun to play with:
forgive the untrimmed code.
# Copyright (C) 2003, Little Bits Ltd:
# All rights reserved.
#
# use LBL;
#
use Win32::OLE; #  qw( EVENTS in with valof );
use Win32::OLE::Variant;
use LWP::UserAgent;
use strict;
use Win32::Process;
use Win32;
our $VERSION = 0.2;
my ($res,$req);
my $url = new URI ("http://localhost/photoserver";);
Win32::OLE->Option( Warn => 0 );

my $args = {
 application_name} => "x",
 width => 626,
 height => 397,
 try_time => 20,
};
my $IE = Win32::OLE->GetActiveObject( 'WebBrowser.Application' );
if( ! defined $IE ){
$IE = Win32::OLE->new( 'InternetExplorer.Application', "Quit" )
|| die "Cannot find Internet Explorer to start $args->{application_name}";
}
$IE->{Visible} = 0;
$IE->Navigate( 'splash.html' );
$IE->{RegisterAsBrowser} = 1;
$IE->{AddressBar} = 0;
$IE->{MenuBar} = 0;
$IE->{Offline} = 0;
$IE->{StatusBar} = 0;
$IE->{ToolBar} = 0;
$IE->{FullScreen} = 1;
$IE->{Left}  = ($IE->{Width}  - $args->{width})/2;
$IE->{Top}   = ($IE->{Height} - $args->{height})/2;
$IE->{Width}  = $args->{width};
$IE->{Height} = $args->{height};
$IE->{ScrollBars} = 0;
$IE->{Visible} = 1;
foreach (qw/ top bottom left right/){
$IE->{Document}->{body}->{$_."Margin"} = 0;
}
while( $IE->{Busy} ){
while( $IE->SpinMessageLoop() ){}
}
$IE->{Visible} = 1;

my $ua = LWP::UserAgent->new(timeout => 5,);
$req = new HTTP::Request('GET', $url);
$res = $ua->request($req);

Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
Probald ki most! http://www.freestart.hu
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: newbie hlelp!

2003-09-18 Thread Lee Goddard

I'm guessing that the @{ } syntax implies not only scalar content but that
what is enclosed in the braces is an array reference, not a list.
Ah, probably: I didn't think beyond scalar

Thanks.
Lee

Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
Probald ki most! http://www.freestart.hu
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: newbie hlelp!

2003-09-16 Thread Lee Goddard

A correction for Lee and Trevor. The "-M" function is not
the same as  (stat $file)[9] which is what the original
poster wanted (i.e. mtime of a file).
You're right of course: not a very good mnemonic.
And whilst I'm showing my ignorance, can someone
please explain to me why stat needs so many brackets?
Same for localtime. I understand both functions can
return a scalar or an array - but what's with the
brackets...? Is there a logic?
tia
lee 


Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
Probald ki most! http://www.freestart.hu
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: newbie hlelp!

2003-09-16 Thread Lee Goddard
At 21:41 15/09/2003, alex p wrote:
Hello all,

I am trying to figure out a way to get the "last modified" date of a file.
I have looked at the following modules but they dont seem to address what 
i need:  stat, utime, opendir
opendir opens a directory so the contents can be listed.
utime changes the modification times associated with the file.
stat will give you the last modified time (as will -M).
warn -M $file;
warn ((stat ($file))[9])
hth
lee





Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
Probald ki most! http://www.freestart.hu
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Perl dereference methods

2003-09-08 Thread Lee Goddard
At 13:31 08/09/2003, Xu, Qiang (XSSC SGP) wrote:
Hi, all:

If @arr is an array, and $rr is a reference to it, that is, $rr = [EMAIL PROTECTED];
When I dereference the array, shall I write @$rr, or @{$rr}?
Either - it's up to you.

Similarly, if %hsh is an hash, and $rhsh is a reference to it, shall I use
%$rhsh, or %{$rhsh) to dereference the hash?
Same, but :
print keys %$rhsh;
print $rhsh->{a_key};

I have seen both usages, but don't know which one is better. Any advantage
of one over the other?
Style.

hth
lee 


Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
Probald ki most! http://www.freestart.hu
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Use of uninitialized value in concatenation (.) or stringat...

2003-09-07 Thread Lee Goddard
At 20:13 06/09/2003, Devon Young wrote:
What does this mean?? I'm thoroughly puzzled and I've been scouring the 
net for an answer. I've been assuming it means I'm not putting strings 
together correctly, but I can't figure out how to fix it. Here's the 
errors I'm getting, followed by the peice of code that the error is 
apparently in. I can't see what's wrong though. The code looks fine to me...


Where did you initialise @_ ?

hth
lee



my $counter = $_[0];
my $x = 1;
while ($counter < ($_[0]+11)) {
# must escape double quotes, so there won't be JS errors.
$artist[$counter][5] =~ s/"/\\"/g;  # line 120
print BLAH "band[$x][1] = \"$artist[$counter][0]\"\;\n";
print BLAH "band[$x][2] = \"$artist[$counter][1]\"\;\n";
print BLAH "band[$x][3] = \"$artist[$counter][2]\"\;\n";
print BLAH "band[$x][4] = \"$artist[$counter][3]\"\;\n";
print BLAH "band[$x][5] = 
\"magnet:?xt=urn:sha1:$artist[$counter][4]&dn=$artist[$counter][10]&xs=http://web1.freepeers.net/uri-res/N2R?urn:sha1:$artist[$counter][4]&dn=$artist[$counter][10]&xs=http://web2.freepeers.net/uri-res/N2R?urn:sha1:$artist[$counter][4]&dn=$artist[$counter][10]\"\;\n";;
print BLAH "band[$x][6] = \"$artist[$counter][5]\"\;\n";
print BLAH "band[$x][7] = \"$artist[$counter][6]\"\;\n";
print BLAH "band[$x][8] = \"$artist[$counter][7]\"\;\n";
print BLAH "band[$x][9] = \"$artist[$counter][8]\"\;\n\n";
$counter++;
$x++;
}



Devon

_
Get 10MB of e-mail storage! Sign up for Hotmail Extra Storage.
http://join.msn.com/?PAGE=features/es
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
Probald ki most! http://www.freestart.hu
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Query the OS for CD-ROM drive letter?

2003-08-27 Thread Lee Goddard
Yes, using Win32API::File::GetLogicalDrives:

getLogicalDrives
"@roots= getLogicalDrives()"
Returns the paths to the root directories of all logical drives
currently defined. This includes all types of drive lettters,
such as floppies, CD-ROMs, hard disks, and network shares. A
typical return value on a poorly equipped computer would be
"("A:\\","C:\\")".
Maybe-useful, maybe-useless code follows.

hth
lee
%DRIVETYPES = (
3=>1, 4=>1,6=>1,
);
my $_drives = sub {
eval('require Win32API::File');
return Win32API::File::getLogicalDrives();
};
foreach my $d (&$_drives){
($d) =~ /^(\w+:)/;
if ($DRIVETYPES{Win32API::File::GetDriveType($d)}
and chdir $d){
# ...
}
}
At 23:12 26/08/2003, Terry Fowler wrote:
I'm writing a script to gather info from a CD and I
know that the drive letter of the CD-ROM drive is
going to vary from machine to machine. Is there a
way in Perl to query the OS for the drive letter of
any CD-ROM drives?
Terry Fowler

Win2K Pro
Perl 5.6.1
___
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: TK::JPEG

2003-08-27 Thread Lee Goddard
Have a look at ftp://theoryx5.uwinnipeg.ca/
They may have one.
At 04:08 27/08/2003, Su, Yu wrote:
Hi,

Does anyone know where I can get a TK::JPEG ppd package for ActivePerl
v5.8.0? I downloaded the source code (v2.014)from CPAN, got compiler error:
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re[2]: OH NOOO SPAM ATTACK!

2003-07-10 Thread Lee Goddard
Hi Leon,

On Thursday, July 10, 2003 at 4:26:50 PM, you wrote:

L> It looks like to me that spammers ARE subscribed to the list and they just sit back 
and watch the traffic fly by and harvest legitimate e-mail address.  They are not 
spamming the list directly but
L> they are spamming the users of the lists indidivually.  I have an e-mail that I 
created only for perl lists and it is now bombarded by spam.  I have another e-mail 
that i have had on the internet
L> for almost 5 years and it rarely gets spam.  
 
My cpan.org address gets 200+ spams a day. It's a sick, sick world.

-- 
Cheers
 Lee

$$=qw$808273788400074285838400657879847269820080698276007265677569820727$;
$$=~s$(\d\d)$\$_.=chr(\$1+32)$ge;eval;



Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
Probald ki most! http://www.freestart.hu
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re[2]: OH NOOO SPAM ATTACK!

2003-07-10 Thread Lee Goddard
Hi =James,

On Thursday, July 10, 2003 at 3:42:24 PM, you wrote:

JB> This is not spam. It's a subscriber to this list who has made the
JB> ill-advised choice to use a spam-blocking service.

Why doesn't the "service" check the mail headers for the
list or bulk setting and ignore such posts?

And is there an open-source anti-spam program in perl?
And if not, why not?

(No, I'd rather not pay ActiveState.)



Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
Probald ki most! http://www.freestart.hu
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: This is what confuses me about my...

2003-07-10 Thread Lee Goddard
Hi Beckett,

BRq> Because the first time I encounter $spreadsheet in my script is within
BRq> brackets, I have to add the line "my $spreadsheet" at teh beginning of my
BRq> script.

You don't *have* to use strict, you know Or you can check-out
the vars pragma (perldoc vars).

But, what's wrong with:

BRq> use strict;
BRq> use warnings;
BRq> use Win32::OLE;

my $spreadsheet;

BRq> if (defined @ARGV) {
BRq> open FILE, $ARGV[0] or die "Can't open $ARGV[0]! $!\n";
BRq> $spreadsheet = $ARGV[1];
BRq> } else {
BRq> open FILE, "Input.txt" or die "Can't open Input.txt! $!\n";
BRq> $spreadsheet = "spreadsheet.xls";
BRq> }

BRq> my $excel = Win32::OLE->GetActiveObject('Excel.Application')
BRq> || Win32::OLE->new('Excel.Application', 'Quit')
BRq> or die "Cannot start Excel! $!\n";

my $book = $excel ->> Workbooks -> Open ($spreadsheet) or die "Can't open
BRq> spreadsheet! $!\n";


-- 
Cheers
 Lee

$$=qw$808273788400074285838400657879847269820080698276007265677569820727$;
$$=~s$(\d\d)$\$_.=chr(\$1+32)$ge;eval;



Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
Probald ki most! http://www.freestart.hu
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re[2]: Displaying a status bar

2003-07-08 Thread Lee Goddard
0002 $| = 1;...
5010 $Workbook->SaveAs($path);
5020 $Workbook->Close();
5030 $Excel->Quit();
5040 print "setPercent(100)";
5050 print h2("Query Completed");
5060 print $r->end_html;

Sorry, I don't know the JavaScript you're talking
about. But,

What happens if you make like 5035 (above) read

 sleep(10);

Does the bar pause?
What's the $r object? CGI or mod_perl or something?
Make sure you have whatever it is send the correct
headers *before* anything else, and that the other
HTML elements are "good", otherwise the browser may
be doing unexpected things.



-- 
Cheers
 Lee

$$=qw$808273788400074285838400657879847269820080698276007265677569820727$;
$$=~s$(\d\d)$\$_.=chr(\$1+32)$ge;eval;

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: $_ = undef; # Creates 'modicication of read-only' error

2003-01-10 Thread Lee Goddard

As I mentioned in my post after the one you replied to,
it must have become a reference, don't you think? I've
got the flu - don't quote me on anything. But in the
post you replied to, I thought I included the perl POD
that contains an example like yours?

At 03:39 10/01/2003, Carl Jolley wrote:

On Thu, 9 Jan 2003, Lee Goddard wrote:

>
> AS Perl 633, Win Apache mod_perl.
>
> Here's a funny thing: I'm getting the runtime error "Modification of a
> read-only value attempted" when $_ is set to any value (including undef).
>
> This is the only $_ in the scope, and it doesn't matter where in the block
> I put it.
> First thing in a subroutine, no change.
>
> $_ contains the literal value 'chat'.
>
> This is weird, *isn't it*?!
>

It's exceptionally weird since if it's read-only, I wonder how it
got the literal value 'chat'. Somehow I don't think that the default
value of $_ is 'chat'. The only way I could see this happening is
if $_ has been "mapped" to literal value in a for/foreach loop. In
such a loop, $_ is the default "loop" variable and if a list item
is a constant, then $_ will refer to the constant and the sort of
behavior you are seeing would be expected. What is the scope of $_?

In any event, here's a short script that will illustrate the point.

foreach (qw(chat sleep fart)) {
  print "$_\n";
  $_.=' now';
  print "$_\n";
}


If you run this script, you'll never get a chance to sleep or fart. (:-D)


 [EMAIL PROTECTED] 
 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



Lee Goddard, BA(Hons), MSc(Sussex)
http://www.LeeGoddard.com/ since 1997.
Direcotr: Little Bits Ltd - Perl / Java / XML / HTML Contractors
Inc. in England #4006170; VAT #755-0139-42

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Negative-indexed arrays?

2002-12-23 Thread Lee Goddard
Thanks. That is what I have been doing.
Appears there is space for yet another
module on cpan.

At 04:43 23/12/2002, Bill Royds -Perl wrote:

When doing something like this, the easiest way to do it is to create an 
indexing function negind as in following example

#!perl -w
my @array=(-3,-2,-1,0,1,2,3);
sub negind ($\@) {
my $offset=shift;
my @negarr=@{+shift};
my $indoff=$offset + int (scalar @negarr)/2- 0.5;
return $indoff
};
print $array[negind(-2, @array)];


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Lee
Goddard
Sent: Sun December 22 2002 18:15
To: $Bill Luebkert
Cc: ActiveState's Perl Win32 Users list
Subject: Re: Negative-indexed arrays?


At 22:37 22/12/2002, $Bill Luebkert wrote:
>Lee Goddard wrote:
>>Perhaps my original question wasn't clear.
>>I do not want $#_-10, I want literally $_[-10].
>
>What's the difference which way it is if you access it only by
>using negative offsets ?

Not *only* negative offsets.

>>In other words:
>>Does anyone know if there is there a module that
>>will allow me to have negative array indices...?
>>Still not clear.
>
>No.

Damn :)

>>I suppose I could use a hash, but what a pain in the
>>arse that'll be
>
>Maybe it would help if we knew why you want to do something so strange. :)

Image mask operators. Doing 2D Gaussian transforms as part of a Laplacian
thing. Bad move in Perl; slow and ugly (troll troll troll).

>Questions:
>Do you know the size of the array ?  Are all of the indices negative ?

Yes & No.

Thanks for trying, though, Bill!  If I had *nix here, I'd be using
prolog anyway, which allows slightly more readable code for this
sort of thing. Currently I'm stuck with offsets.

Really it all comes down to clarity of coding, nothing more.

I suppose I could create an object that takes the indices as
arguments and returns the value of the element.




___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Lee Goddard, BA(Hons), MSc(Sussex)
http://www.LeeGoddard.com/ since 1997.
Direcotr: Little Bits Ltd - Perl / Java / XML / HTML Contractors
Inc. in England #4006170; VAT #755-0139-42

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Negative-indexed arrays?

2002-12-23 Thread Lee Goddard

That's true: my Grandfather programmed it decades ago.
So can Prolog.

But is it relevant?!

At 05:13 23/12/2002, Bill Royds -Perl wrote:

Fortran can use any indices you want by declaring it as
real foo(-10:10)

and has been able to do that for years.






___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: RE: Negative-indexed arrays?

2002-12-22 Thread Lee Goddard
How much detail would you like, Mr Cernansky?

I'm creating variable sized gaussian masks for
image transformations. I'm currently using an
offset to index, but I don't want to do that, as
it's ugly to read. I'm only using Perl for prototyping
a larger image recognition project, but perhaps that as
a bad idea. (Troll alert.)

As I said, I don't want to use a hash, as it's not
really the job for a hash.

What I'd really like is ... an array/matrix/vector
that would let me use negative indices. ;)

Lee

At 23:16 22/12/2002, Bill Cernansky wrote:

>From the limited detail you're providing, it seems that perhaps a hash
is actually what you want anyway. What are the minimum and maximum
values of your indices? If you have a known min and max, you could
create an array whose indices could be offset by a constant. But that
seems like a big pain when you could just use a hash.

-Bill Cernansky

- Original Message -
From: Lee Goddard <[EMAIL PROTECTED]>
Date: Sunday, December 22, 2002 6:09 am
Subject: RE: Negative-indexed arrays?

> Perhaps my original question wasn't clear.
> I do not want $#_-10, I want literally $_[-10].
>
> In other words:
>
> Does anyone know if there is there a module that
> will allow me to have negative array indices...?
>
> Still not clear.
>
> I suppose I could use a hash, but what a pain in the
> arse that'll be
>
> At 14:23 22/12/2002, Burak Gürsoy wrote:
> >You didn't specify the size of @_ private array... You say -10th
> element>from the end to start, but -10 from which number?
> >
> >20-10 ?
> >30-10?
> >
> >or 4987-10???
> >
> >Your code has a logic error...
> >
> >If you say
> >
> >$_[a_positive_number] = what_ever_thing;
> >
> >the array's size will be increased and ther will be no problem
> >
> >-Original Message-
> >From: [EMAIL PROTECTED]
> >[mailto:[EMAIL PROTECTED]]On Behalf
> Of Lee
> >Goddard
> >Sent: 22 Aralýk 2002 Pazar 15:19
> >To: Sisyphus; ActiveState's Perl Win32 Users list
> >Subject: Re: Negative-indexed arrays?
> >
> >
> >At 12:38 22/12/2002, Sisyphus wrote:
> >
> > >- Original Message -
> > >From: "Lee Goddard" <[EMAIL PROTECTED]>
> > >
> > > > Not specifically Win32, but do you know if there a module to
> allow me to
> > > > have an array with negative indices?
> > > >
> > >
> > >No module required. Perl permits negative indexing -
> > >$array[-1] being the last element, $array[-2] the second last,
> and so on.
> >
> >That's funny - I got this:
> >
> >  C:\>perl -e "$_[-10]='foo'"
> >  Modification of non-creatable array value attempted,
> >  subscript -10 at -e line 1.
> >
> >What am I doing wrong, Rob?
> >
> >Cheers
> >lee
> >
> >
> >
> >Lee Goddard, BA(Hons), MSc(Sussex)
> >http://www.LeeGoddard.com/ since 1997.
> >Direcotr: Little Bits Ltd - Perl / Java / XML / HTML Contractors
> >Inc. in England #4006170; VAT #755-0139-42
> >
> >___
> >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
>
>
> Lee Goddard, BA(Hons), MSc(Sussex)
> http://www.LeeGoddard.com/ since 1997.
> Direcotr: Little Bits Ltd - Perl / Java / XML / HTML Contractors
> Inc. in England #4006170; VAT #755-0139-42
>
> ___
> 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



Lee Goddard, BA(Hons), MSc(Sussex)
http://www.LeeGoddard.com/ since 1997.
Direcotr: Little Bits Ltd - Perl / Java / XML / HTML Contractors
Inc. in England #4006170; VAT #755-0139-42

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Negative-indexed arrays?

2002-12-22 Thread Lee Goddard
That was a really useful suggestion: thanks, Carl.
Scoping it seems to be the problem. I'll have a look
for a good CPAN search engine.

Thanks
lee

At 23:35 22/12/2002, Carl Jolley wrote:

I don't know of a module, however you might look at perldoc perlvar
for the info on $[. This is the index of the first element of an
array, normally, and by default 0. However I don't see anything
that says $[ can't be set to an arbirtary value. It will, however
affect the index of the first element of _all_ the arrays your
script uses. It also affects the index of the first character of
strings. Usually, when $[ isn't 0, it is set to 1 for compabability
with languages like fortrash that use 1 as the index of the first
element of an array.

 [EMAIL PROTECTED] 
 All opinions are my own and not necessarily those of my employer ****

On Sun, 22 Dec 2002, Lee Goddard wrote:

> Perhaps my original question wasn't clear.
> I do not want $#_-10, I want literally $_[-10].
>
> In other words:
>
> Does anyone know if there is there a module that
> will allow me to have negative array indices...?
>
> Still not clear.
>
> I suppose I could use a hash, but what a pain in the
> arse that'll be
>
> At 14:23 22/12/2002, Burak Gürsoy wrote:
> >You didn't specify the size of @_ private array... You say -10th element
> >from the end to start, but -10 from which number?
> >
> >20-10 ?
> >30-10?
> >
> >or 4987-10???
> >
> >Your code has a logic error...
> >
> >If you say
> >
> >$_[a_positive_number] = what_ever_thing;
> >
> >the array's size will be increased and ther will be no problem
> >
> >-Original Message-
> >From: [EMAIL PROTECTED]
> >[mailto:[EMAIL PROTECTED]]On Behalf Of Lee
> >Goddard
> >Sent: 22 Aralýk 2002 Pazar 15:19
> >To: Sisyphus; ActiveState's Perl Win32 Users list
> >Subject: Re: Negative-indexed arrays?
> >
> >
> >At 12:38 22/12/2002, Sisyphus wrote:
> >
> > >- Original Message -
> > >From: "Lee Goddard" <[EMAIL PROTECTED]>
> > >
> > > > Not specifically Win32, but do you know if there a module to 
allow me to
> > > > have an array with negative indices?
> > > >
> > >
> > >No module required. Perl permits negative indexing -
> > >$array[-1] being the last element, $array[-2] the second last, and 
so on.
> >
> >That's funny - I got this:
> >
> >  C:\>perl -e "$_[-10]='foo'"
> >  Modification of non-creatable array value attempted,
> >  subscript -10 at -e line 1.
> >
> >What am I doing wrong, Rob?
> >
> >Cheers
> >lee
> >
> >
> >
> >Lee Goddard, BA(Hons), MSc(Sussex)
> >http://www.LeeGoddard.com/ since 1997.
> >Direcotr: Little Bits Ltd - Perl / Java / XML / HTML Contractors
> >Inc. in England #4006170; VAT #755-0139-42
> >
> >___
> >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
>
>
> Lee Goddard, BA(Hons), MSc(Sussex)
> http://www.LeeGoddard.com/ since 1997.
> Direcotr: Little Bits Ltd - Perl / Java / XML / HTML Contractors
> Inc. in England #4006170; VAT #755-0139-42
>
> ___
> 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


Lee Goddard, BA(Hons), MSc(Sussex)
http://www.LeeGoddard.com/ since 1997.
Direcotr: Little Bits Ltd - Perl / Java / XML / HTML Contractors
Inc. in England #4006170; VAT #755-0139-42

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Negative-indexed arrays?

2002-12-22 Thread Lee Goddard
At 22:37 22/12/2002, $Bill Luebkert wrote:

Lee Goddard wrote:

Perhaps my original question wasn't clear.
I do not want $#_-10, I want literally $_[-10].


What's the difference which way it is if you access it only by
using negative offsets ?


Not *only* negative offsets.


In other words:
Does anyone know if there is there a module that
will allow me to have negative array indices...?
Still not clear.


No.


Damn :)


I suppose I could use a hash, but what a pain in the
arse that'll be


Maybe it would help if we knew why you want to do something so strange. :)


Image mask operators. Doing 2D Gaussian transforms as part of a Laplacian 
thing. Bad move in Perl; slow and ugly (troll troll troll).

Questions:
Do you know the size of the array ?  Are all of the indices negative ?


Yes & No.

Thanks for trying, though, Bill!  If I had *nix here, I'd be using
prolog anyway, which allows slightly more readable code for this
sort of thing. Currently I'm stuck with offsets.

Really it all comes down to clarity of coding, nothing more.

I suppose I could create an object that takes the indices as
arguments and returns the value of the element.




___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Problem in current directory reference

2002-12-20 Thread Lee Goddard
chdir is not current directory: it's CHange Directory.

Try:

use Cwd;
warn cwd;

CWD is Current Working Directory.


At 16:24 20/12/2002, Shailesh wrote:


I am facing a strange problem in my Perl script. When I run my Perl script 
from a sub folder, it takes the root folder as the reference. The `chdir` 
(current directory) command is giving me the C: irrespective of where I 
run my Perl script from.

I think this has to do with some environment setting on Perl but I am not 
sure which one.

I would really appreciate if you can help me here.



Regards,

Shailesh


Lee Goddard, BA(Hons), MSc(Sussex)
http://www.LeeGoddard.com/ since 1997.
Direcotr: Little Bits Ltd - Perl / Java / XML / HTML Contractors
Inc. in England #4006170; VAT #755-0139-42

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Direct to Browser interaction

2002-12-20 Thread Lee Goddard
It's really not hard, and you don't need
to do much: read through the comments in
the httpd.conf file, and they're pretty
much self-explanitory. Just don't try and
use too many of the features to begin with
- work from the basics.

Good luck
lee

At 14:08 20/12/2002, Shain Edge wrote:

Thank you Bill and Lee. I'll check it out.

Biggest problems is figuring out how it needs to be
configured. I didn't have much luck in configuring
Apache for Linux.

Shain

--- Lee Goddard <[EMAIL PROTECTED]> wrote:
> You might want to look at Tk::HTML, but really,
> it's easier to use a web server. Apache is free
> and reasonably reliable on Win32; PWS or IIS comes
> with Windows.
>
> Try the Perl Win32 Web list for advice on servers
> (maybe), and the comp.lang.perl.tk list for TK
> advice.
>
> Cheers
> lee
>
> At 09:16 20/12/2002, Shain Edge wrote:
> >I'm both new and old to perl. While I know perl
> basics
> >there is something I think is possible, but I have
> no
> >idea how to do.
> >
> > >From a perl program, how do I open up the default
> >browser on the computer and display html directly
> from
> >the program without the need of calling a html
> file?
> >Ind, if this is possible, is there a way to read
> from
> >the form elements of the file?
> >
> >I thought that the Win32::OLE might do the trick,
> but
> >the lack of documentation makes me uncertain how it
> is
> >possible.
> >
> >My reason of doing this is that I thought that it
> >might be easier then Tk for a GUI, assuming it is
> >possible.
> >
> >Shain
> >
> >=
> >Mekton Compendium:
> http://groups.yahoo.com/subscribe/mekton-c
> >
> >Nothing is impossible. the supposidly impossible
> can be made possible by
> >anyone who determines what you need to do to make
> it a reality. -Shain Edge
> >
> >__
> >Do you Yahoo!?
> >Yahoo! Mail Plus - Powerful. Affordable. Sign up
> now.
> >http://mailplus.yahoo.com
> >___
> >Perl-Win32-Users mailing list
> >[EMAIL PROTECTED]
> >To unsubscribe:
> http://listserv.ActiveState.com/mailman/mysubs
>
>
> Lee Goddard, BA(Hons), MSc(Sussex)
> http://www.LeeGoddard.com/ since 1997.
> Direcotr: Little Bits Ltd - Perl / Java / XML / HTML
> Contractors
> Inc. in England #4006170; VAT #755-0139-42
>


=
Mekton Compendium: http://groups.yahoo.com/subscribe/mekton-c

Nothing is impossible. the supposidly impossible can be made possible by 
anyone who determines what you need to do to make it a reality. -Shain Edge

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com


Lee Goddard, BA(Hons), MSc(Sussex)
http://www.LeeGoddard.com/ since 1997.
Direcotr: Little Bits Ltd - Perl / Java / XML / HTML Contractors
Inc. in England #4006170; VAT #755-0139-42

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Direct to Browser interaction

2002-12-20 Thread Lee Goddard
You might want to look at Tk::HTML, but really,
it's easier to use a web server. Apache is free
and reasonably reliable on Win32; PWS or IIS comes
with Windows.

Try the Perl Win32 Web list for advice on servers
(maybe), and the comp.lang.perl.tk list for TK
advice.

Cheers
lee

At 09:16 20/12/2002, Shain Edge wrote:

I'm both new and old to perl. While I know perl basics
there is something I think is possible, but I have no
idea how to do.

>From a perl program, how do I open up the default
browser on the computer and display html directly from
the program without the need of calling a html file?
Ind, if this is possible, is there a way to read from
the form elements of the file?

I thought that the Win32::OLE might do the trick, but
the lack of documentation makes me uncertain how it is
possible.

My reason of doing this is that I thought that it
might be easier then Tk for a GUI, assuming it is
possible.

Shain

=
Mekton Compendium: http://groups.yahoo.com/subscribe/mekton-c

Nothing is impossible. the supposidly impossible can be made possible by 
anyone who determines what you need to do to make it a reality. -Shain Edge

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Lee Goddard, BA(Hons), MSc(Sussex)
http://www.LeeGoddard.com/ since 1997.
Direcotr: Little Bits Ltd - Perl / Java / XML / HTML Contractors
Inc. in England #4006170; VAT #755-0139-42

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Win32 alarm()

2002-12-19 Thread Lee Goddard
The Unsupported function alarm function is unimplemented at 
C:\Lang\Perl633\site\lib\Commerce\PhotoWebServer\temp.pl line 3.
...propagated at 
C:\Lang\Perl633\site\lib\Commerce\PhotoWebServer\temp.pl line 8.

Tool completed with exit code 22

Has anyone a substitute?

Someone at AS may also want to take a look at the grammar
of that error message...

ANd if someone from AS is reading this - could you please
have a word with your web designer and ask them how on the website
I can select to again receive temporarily-disabled mailing?

I might have a look at the grammar of that last sentence ...

Cheers
lee




Lee Goddard, BA(Hons), MSc(Sussex)
http://www.LeeGoddard.com/ since 1997.
Direcotr: Little Bits Ltd - Perl / Java / XML / HTML Contractors
Inc. in England #4006170; VAT #755-0139-42

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Two questions...

2002-12-12 Thread Lee Goddard


At 18:03 12/12/2002, Burak Gürsoy wrote:

Well... TextPad is shareware, but it has no time limits and it does not
block any functionality (FYI)... It's a nice editor and does not eat your
system resources...


Textpad is only $15. Dodn't they pay you?

Sheesh.


Lee Goddard, BA(Hons), MSc(Sussex)
http://www.LeeGoddard.com/ since 1997.
Direcotr: Little Bits Ltd - Perl / Java / XML / HTML Contractors
Inc. in England #4006170; VAT #755-0139-42

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: utime issue on Win32

2002-12-12 Thread Lee Goddard
Ah yes, thanks Bill.  I'd even read the second, but
didn't compute NT as including Win2k (NT5).

Completely missed the first although I read it - that
win32 tucked away at the end after the full-stop escaped my
rushing eyes.

Sigh.

Thanks.
lee

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Can arrays be used as scalars?

2002-11-28 Thread Lee Goddard

Please stop posting this! Please read
the headers and footer of the e-mails of
the list you subscribed to - that'll tell
you how to unsubscribe. You'll find most
lists work like this.

Thanks

Lee

At 11:50 28/11/2002, tran bao toan wrote:


please do not send me anymore email, thanks!

 [EMAIL PROTECTED] wrote:
On 24/11/2002 08:06:35 RCTay wrote:

>my( @dir, $free);
>@dir =3D `dir`;
>$free =3D $dir[$#dir];
>
>This code was written by a friend of mine. "@dir" was declared as
a array, but
>in the second line it is used as a scalar. How is that possible? There
are no
>warnings given by the interpreter. Can you please explain why it can be
used?

Neither the second nor the third line is valid Perl.

Bareword found where operator expected at -e line 1, near "3D"
(Missing operator before D?)
Backticks found where operator expected at -e line 1, near "D `dir`"
(Do you need to predeclare D?)

Or did you mean something else ?

--
Csaba Ráduly, Software Engineer Sophos Anti-Virus
email: [EMAIL PROTECTED] http://www.sophos.com
US Support: +1 888 SOPHOS 9 UK Support: +44 1235 559933

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Do you Yahoo!?
<http://rd.yahoo.com/mail/mailsig/*http://mailplus.yahoo.com>Yahoo! Mail 
Plus - Powerful. Affordable. 
<http://rd.yahoo.com/mail/mailsig/*http://mailplus.yahoo.com>Sign up now


Lee Goddard, BA(Hons), MSc(Sussex)
http://www.LeeGoddard.com/ since 1997.
Direcotr: Little Bits Ltd - Perl / Java / XML / HTML Contractors
Inc. in England #4006170; VAT #755-0139-42

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Substitution

2002-11-26 Thread Lee Goddard

Er, what were you trying to do again?

Why won't { my @bits = split":",$in; } be good enough
to get the bits, and the rewriting as {print join":",@bits} ?

Sorry, little history in my box

lee


Lee Goddard, BA(Hons), MSc(Sussex)
http://www.LeeGoddard.com/ since 1997.
Direcotr: Little Bits Ltd - Perl / Java / XML / HTML Contractors
Inc. in England #4006170; VAT #755-0139-42

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Justifying text in a Tk label?

2002-11-25 Thread Lee Goddard
At 16:23 25/11/2002, Beckett Richard-qswi266 wrote:

Anyone know how to justify the text within a Tk label?

I tried many combinations, like:

my $label = $frame->Label (-text => "Hostname :", -relief => "raised",
-borderwidth => "2", -width => "25", -justify => "left")

-> pack (-side => "top", -anchor => "e", -padx => "1", -pady => "1");

But I couldn't make any difference, the text is always centered.

Thanks.


It's probably a Tk-users question, but.... I know the problem.
I think you'll need to set the anchor to west, as that's the
left side --- east is the right side

lee



Lee Goddard, BA(Hons), MSc(Sussex)


http://www.LeeGoddard.com/ since 1997.
Direcotr: Little Bits Ltd - Perl / Java / XML / HTML Contractors
Inc. in England #4006170; VAT #755-0139-42

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: OO question

2002-07-30 Thread Lee Goddard


> > I'm starting to get into OO programming with Perl and
> > have a question.
> >
> > As I understand it with OO - you create an object and
> > then do something to it.
> >
> > I have a list of values in an array and I wish to do
> > the same "something" to all of them.
> >
> > Do I need to create an object for each value in the
> > array and then do something to all of them ?
> >
> > Or can I create 1 object and do the "something" to all
> > the values from within that 1 object ? (if that makes
> > sense !)

Either, really, depending what you want to do.

If the array is a part of your object (a field or a
slot of the object), then you will probably write a
method of the object to handle that field: say your
object is a car, with a list of four elements representing
wheels, you may have a method named 'turn' which
you apply to all wheels -- and probably a method
'turn wheels' which takes no parameters (other than
the object...) to perform the 'turn' method upon all
wheels.

On the other hand, you may have an array of values which
you wish to process with an object: say you have
four HTML pages, each of which you wish to parse with
a parser such as HTML::TokeParser - then you'll have
to create a new parser (an 'instance' of the parser) for
each HTML page.

So, if you'd like to give a more concerete example of
what you're doing!

Hope it helps,
lee


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: How to list files in directory ? How to substitute space ?

2002-07-05 Thread Lee Goddard

At 07:59 05/07/2002, $Bill Luebkert wrote:

>I'm afraid you will find that that is the fastest method except you
>wrote it wrong - there is no need for the while {} part:
>
>my $str = "   this is a test files  ";
>$str =~ s/^\s+//; $str =~ s/\s+$//;
>print $str, "\n";

What's wrong with:

 s/^\s+(.*[^\s]+)\s+$/$1/sg;

Surely something?

Lee

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: embedding/extending problem

2002-07-04 Thread Lee Goddard

At 14:17 04/07/2002, Calin Fandango wrote:


>I attach to this email two packages I've built in linux:

I wish you wouldn't, not because this is a Perl list,
but because of the other obvious reason.

lee


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Flame Troll

2002-06-18 Thread Lee Goddard

Okay, all of you - outside in the carpak NOW



Lee Goddard
perl -e "while(1){print rand>0.5?chr 47:chr 92}"

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Packages Included and not

2002-06-12 Thread Lee Goddard

At 11:48 12/06/2002, Michael D. Smith wrote:

>I just tried:
>
>useWin32::OLE;
>
>And I got two errors, package strict wasn't found nor was package vars. A 
>search of C drive found neither on my computer, so they weren't just not 
>found, they aren't here.

'stirct' and 'vars' are pragma, part of the standard distribution.
Where did you get your Perl?!

Really: you must re-install - who knows whatever other devilments
have befallen your system?

hth
lee







Lee Goddard
perl -e "while(1){print rand>0.5?chr 47:chr 92}"

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Send email in ActivePerl using SMTP

2002-06-12 Thread Lee Goddard

For someone: untested should work.

use Mail::Sender;
sub sendmail { my ($subject,$from, $rep, $to, $cc) = (@_);
my $sender = new Mail::Sender {
 smtp => $SMTP_SERVER_NAME,
 from => $MAIL_RETURN_ADDRESS,
};
die $Mail::Sender::Error if not ref $sender;
$_ = $sender->MailMsg({
 to => $to,
 cc => $cc,
 subject => $subject,
 msg => $rep
});
die $Mail::Sender::Error if not ref $_;
warn "Sent.\n";
}

Lee Goddard
perl -e "while(1){print rand>0.5?chr 47:chr 92}"

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Sorry (was RE: Regular Expression Help)

2002-06-12 Thread Lee Goddard

My fault: I'm sorry. I avoid usenet for the same reasons.
I apologise.

But really, such use of English makes me wonder about
possible use of Perl.

However, I must say that it is not the whole group, just
me.

Lee

At 04:19 12/06/2002, Allegakoen, Justin Devanandan wrote:
>Lets not point fingers here, but this group is starting to become like
>comp.lang.perl.misc
>
>I subscribed to this list to avoid that type of . . . [insert disparaging
>term here] . . .
>
>We have all sort of people inside this list, from many country, some of our
>grammer are
>worst then others, but lets remember that we is all brothers in alms with
>our won common
>language - Perl ; )
>
>Flame at will!
>
>-Original Message-
>From: Ron Grabowski [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, June 12, 2002 2:16 AM
>To: [EMAIL PROTECTED]
>Subject: Re: Regular Expression Help
>
>
> > >phone number. The three digit is
> >
> > are
>
>digits
>___
>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

Lee Goddard
perl -e "while(1){print rand>0.5?chr 47:chr 92}"

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: FAQ

2002-05-22 Thread Lee Goddard

At 17:00 22/05/2002, Aaron Trevena wrote:
> > >Actually its better to include the urls to the archive and the faq in the
> > >email footer.
> >
> > That's a very bold statement - can you support it?
>
>Yup - a decent faq and a reminder work rather well for most FAQ's  assuming
>the users read some emails before posting and didn't subscribe just to ask a
>question.

Ah, the flaw in your argument!  You're quite new here aren't you...?!

>An auto-responder would be unpopular and put new users off, as
>well as being a pain to maintain.

I disagree with all but the last. If it posts to the e-mail address of
the one who posted, who would it be unpopular with?  If the message
to the poster said something along the lines of "This may answer...
if not your message may be answered by another subscriber..."
Why would it be unpopular?

>Of all the lists I have subscribed to none
>use an auto-responder, usenet has managed without an autoresponder too. FAQs
>and newbies are a social rather than technical issue and need to be
>addressed as such.

For a start, I'm not talking about "newbies", I'm talking about people who
don't read FAQs - but above you assume that people don't post before
reading FAQs, so we're on a different line here.

As for "no-one has a wheel in my village, they must be useless"... you
can see my point already I trust.

>Having said that you could use an infobot hooked up to email to auto-respond
>with helpful hints to the user, then post the mail to the list with the
>auto-response appended on the end to show what the auto-responder said.

That is pretty much my point.

>Just blocking FAQs won't help -

Who said "blocking"?

>politely pointing out that FAQs are answered
>in the docs and FAQ

I do it all the time, my friend.

>works better than flames or blocking users.

I've never seen a flame war here in five years.

> > I yet to remain convinced of the relevance of childrens' TV to perl...
>
>Many FAQs asked on here could be answered sharpish by Dipsy or Purl on
>#london.pm and #perl respectively

I take your word for it. But I yet to be convinced of the relevance of 
childrens' TV to Perl, though.

Lee


Lee Goddard
perl -e "while(1){print rand>0.5?chr 47:chr 92}"

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: FAQ

2002-05-22 Thread Lee Goddard

At 15:23 22/05/2002, Aaron Trevena wrote:
> > Why don't we make a FAQ Auto-responder?
> > It could scan subjects and first ten lines for
> > a FAQ, and if it finds one, send the FAQ answer.
> >
> > So it wouldn't cope with the silliest questions,
> > but should get most
>
>Actually its better to include the urls to the archive and the faq in the
>email footer.

That's a very bold statement - can you support it?

>This is especially useful on mailing lists like this.
>
>Also I can reccomend a well trained infobot on irc - the perl mongers have
>several very well informed infobots that do things like whois and weather
>lookups as well as factoids on all thing perl related (monty python, buffy
>the vampire slayer, photos of drunken perl mongers and camels)

I yet to remain convinced of the relevance of childrens' TV to perl...

Lee Goddard
perl -e "while(1){print rand>0.5?chr 47:chr 92}"

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



FAQ

2002-05-22 Thread Lee Goddard

Why don't we make a FAQ Auto-responder?
It could scan subjects and first ten lines for
a FAQ, and if it finds one, send the FAQ answer.

So it wouldn't cope with the silliest questions,
but should get most

Lee Goddard
perl -e "while(1){print rand>0.5?chr 47:chr 92}"

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Mail::Sender - bug?

2002-05-21 Thread Lee Goddard

Sorry, Jenda; thanks Matt, Rob --- I am a very sleepy, early-morning JAPH
with the road being dug up outside thanks!

Lee "use strict" Goddard

>-Original Message-
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED]]On Behalf Of Lee
>Goddard
>Sent: 21 May 2002 09:22
>To: [EMAIL PROTECTED]
>Cc: [EMAIL PROTECTED]
>Subject: Mail::Sender - bug?
>
>
>Hi!
>
>#! perl;
>use Mail::Sender;
>$to = "[EMAIL PROTECTED]";
>for (1..10){
>my $sender = new Mail::Sender;
>die $Mail::Sender::Error if not ref $sender;
>my $rep = '';
>open (REP, "Report") or die "Cannot open Report: $!\n";
>  read REP, $rep, -s REP;
>close REP;
>$_ = $sender->MailMsg({
>  to => $to,
>  subject => "Read About SMTP Headers",
>  msg => $rep
>});
>die $Mail::Sender::Error if not ref $_;
>warn "Sent.\n";
>}
>
>OUTPUT reads:
>
>Local user "test.com" unknown on host "127.0.0.1" at C:\Documents and
>Settings\Administrator\Desktop\foo.pl line 16.
>
>Tool completed with exit code 2
>
>
>Any ideas?
>
>$Mail::Sender::VERSION='0.7.13.1';
>
>Thanks in anticipation,
>lee goddard
>
>Lee Goddard
>perl -e "while(1){print rand>0.5?chr 47:chr 92}"
>
>___
>Perl-Win32-Users mailing list
>[EMAIL PROTECTED]
>To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Lee Goddard
perl -e "while(1){print rand>0.5?chr 47:chr 92}"

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Image Resize

2002-05-21 Thread Lee Goddard


Or Image::GD::Thumbnail

At 21:08 17/05/2002, Tillman, James wrote:
>You might try the GD module.  It seems to do some things like that.
>jpt
>-Original Message-
>From: Frederic Bournival [mailto:[EMAIL PROTECTED]]
>Sent: Friday, May 17, 2002 1:48 PM
>To: Perl Win32-users
>Subject: Image Resize
>
>Hello guys,
>
>is there a way to resize .jpg and .gif on the fly without ImageMagick ?
>
>It seems to be so easy with PHP...
>
>Thanx a lot !
>
>
>Frédéric Bournival

Lee Goddard
perl -e "while(1){print rand>0.5?chr 47:chr 92}"

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Mail::Sender - bug?

2002-05-21 Thread Lee Goddard

Hi!

#! perl;
use Mail::Sender;
$to = "[EMAIL PROTECTED]";
for (1..10){
my $sender = new Mail::Sender;
die $Mail::Sender::Error if not ref $sender;
my $rep = '';
open (REP, "Report") or die "Cannot open Report: $!\n";
 read REP, $rep, -s REP;
close REP;
$_ = $sender->MailMsg({
 to => $to,
 subject => "Read About SMTP Headers",
 msg => $rep
});
die $Mail::Sender::Error if not ref $_;
warn "Sent.\n";
}

OUTPUT reads:

Local user "test.com" unknown on host "127.0.0.1" at C:\Documents and 
Settings\Administrator\Desktop\foo.pl line 16.

Tool completed with exit code 2


Any ideas?

$Mail::Sender::VERSION='0.7.13.1';

Thanks in anticipation,
lee goddard

Lee Goddard
perl -e "while(1){print rand>0.5?chr 47:chr 92}"

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Compare two arrays.

2002-05-14 Thread Lee Goddard


It's in the FAQ.

perldoc -q compare

Lee

At 18:54 14/05/2002 +, steve silvers wrote:
>I have two different fields im pulling from my database.
>
>$row1 = (12|13|14|15|16|17|18|19|20); #compare with what's below.
>
>$row2 = (12|14|20|14|14|15|15|23|13); #original data.
>
>I need to compare what's in $row1, with what's in $row2, a...
>
>Too many errors encountered; the rest of the message is ignored:
>are duplicates. The above would render.
>
>12 one time.
>13 one time.
>14 three times.
>15 two times.
>16 zero times.
>17 zero times.
>18 zero times.
>19 zero times.
>20 zero times.
>
>That's it. I'm sure this is pretty easy for some. The numbers are pipe
>delimited.
>
>Any suggestions.
>Thanks in advance.
>Steve.
>
>
>_
>Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
>___________
>Perl-Win32-Users mailing list
>[EMAIL PROTECTED]
>To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Lee Goddard
perl -e "while(1){print rand>0.5 ? chr 47 : chr 92}"

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Archive::Tar problems on Win32

2002-05-14 Thread Lee Goddard

Thanks - but I have version 1.16 of that...

lee

At 15:06 14/05/2002 -0400, Tillman, James wrote:
>I've seen similar errors when Compress::Zlib isn't installed.
>jpt
>
> > -Original Message-----
> > From: Lee Goddard [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, May 14, 2002 3:10 PM
> > To: ActiveState's Perl Win32 Users list
> > Subject: Archive::Tar problems on Win32
> >
> >
> > Having terrible Archive::Tar problems on Win32:
> >
> > "Can't call method "gzread" on an undefined value at
> > C:/Lang/Perl/site/lib/Archiv
> > e/Tar.pm line 274."
> >
> > Anyone else seen this?
> >
> > Full transcipts below.
> >
> > TIA
> > lee
> >
> >
> > Microsoft Windows 2000 [Version 5.00.2195]
> > (C) Copyright 1985-2000 Microsoft Corp.
> >
> > C:\>cd C:\temp\t\Test-Simple-0.44
> >
> > C:\temp\t\Test-Simple-0.44>makefile.pl
> > Warning: prerequisite Test::Harness 1.23 not found at
> > C:/Lang/Perl/lib/ExtUtils/
> > MakeMaker.pm line 343.
> > Writing Makefile for Test::Simple
> >
> > C:\temp\t\Test-Simple-0.44>ppm install test::harness
> > Installing package 'test-harness'...
> > Bytes transferred: 23891
> > Can't call method "gzread" on an undefined value at
> > C:/Lang/Perl/site/lib/Archiv
> > e/Tar.pm line 274.
> >
> > C:\temp\t\Test-Simple-0.44>ppm3 install test-harness
> > 
> > Install 'test-harness' version 2.21 in ActivePerl 5.6.1.631.
> > 
> > Downloaded 23891 bytes.
> > Extracting package. This may take a few seconds.
> > Can't remove directory
> > C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/Test-Harness-1944: Per
> > mission denied at /PerlApp/PPM/Repository.pm line 214
> > Error: Can't call method "gzread" on an undefined value at
> > C:/Lang/Perl/site/lib/Archive/Tar.pm line 274.
> >
> > C:\temp\t\Test-Simple-0.44>
> >
> >
> >
> > Lee Goddard
> > perl -e "while(1){print rand>0.5 ? chr 47 : chr 92}"
> >
> > ___
> > Perl-Win32-Users mailing list
> > [EMAIL PROTECTED]
> > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> >

Lee Goddard
perl -e "while(1){print rand>0.5 ? chr 47 : chr 92}"

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Archive::Tar problems on Win32

2002-05-14 Thread Lee Goddard

Having terrible Archive::Tar problems on Win32:

"Can't call method "gzread" on an undefined value at 
C:/Lang/Perl/site/lib/Archiv
e/Tar.pm line 274."

Anyone else seen this?

Full transcipts below.

TIA
lee


Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.

C:\>cd C:\temp\t\Test-Simple-0.44

C:\temp\t\Test-Simple-0.44>makefile.pl
Warning: prerequisite Test::Harness 1.23 not found at 
C:/Lang/Perl/lib/ExtUtils/
MakeMaker.pm line 343.
Writing Makefile for Test::Simple

C:\temp\t\Test-Simple-0.44>ppm install test::harness
Installing package 'test-harness'...
Bytes transferred: 23891
Can't call method "gzread" on an undefined value at 
C:/Lang/Perl/site/lib/Archiv
e/Tar.pm line 274.

C:\temp\t\Test-Simple-0.44>ppm3 install test-harness

Install 'test-harness' version 2.21 in ActivePerl 5.6.1.631.

Downloaded 23891 bytes.
Extracting package. This may take a few seconds.
Can't remove directory 
C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/Test-Harness-1944: Per
mission denied at /PerlApp/PPM/Repository.pm line 214
Error: Can't call method "gzread" on an undefined value at
C:/Lang/Perl/site/lib/Archive/Tar.pm line 274.

C:\temp\t\Test-Simple-0.44>



Lee Goddard
perl -e "while(1){print rand>0.5 ? chr 47 : chr 92}"

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Why my boss doesn't want Perl...

2002-05-14 Thread Lee Goddard

At 11:58 14/05/2002 -0400, you wrote:
>On Tue, May 14, 2002 at 09:09:05AM -0500, Cameron Dorey wrote:
> > > At 08:50 13/05/2002 -0400, Tillman, James wrote:
> > >
> > > >We're discussing hackers using the true meaning of the word, which is "a
> > > >programmer who loves his craft", not "a stupid jerk with nothing 
> better to
> > > >do than trash other people's systems."
> > >
> > > I've got an OED CD-ROM here somewhere.
> >
> > I don't have OED here, but according to Mirriam-Webster OnLine, you're
> > more closely referring to a "hack" (which was my first impression):
> >
> > "3a : a person who works solely for mercenary reasons : HIRELING  > hacks> b : a writer who works on order; also : a writer who aims solely
> > for commercial success]"
>
>See:
>
>http://www.tuxedo.org/~esr/jargon/html/entry/hacker.html
>http://everything2.com/index.pl?node_id=11670&lastnode_id=12922

http://everything2.com/index.pl?node_id=12922&lastnode_id=11670

Nice, but not really authorities I do have the OED CD here somewhere.
Actually, I'm sure I'm wrong, in that my reading is old fashioned, but
I'm kindov enjoying everyone's research, so I shan't admit it yet

lee

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Why my boss doesn't want Perl...

2002-05-14 Thread Lee Goddard

At 09:09 14/05/2002 -0500, Cameron Dorey wrote:
>Lee Goddard wrote:
> >
> > At 08:50 13/05/2002 -0400, Tillman, James wrote:
> >
> > >We're discussing hackers using the true meaning of the word, which is "a
> > >programmer who loves his craft", not "a stupid jerk with nothing better to
> > >do than trash other people's systems."
> >
> > Pedantic: the former is usually technically referred to as an acquired 
> meaning,
> > as is the latter.  There are of course few "true" meanings to words, but
> > the most widely-established use of the word "hacker" is the latter, derived
> > from the use in literary circles to refer to those who can't really 
> write, but
> > do so anyway for money.
> >
> > I've got an OED CD-ROM here somewhere.
>
>I don't have OED here, but according to Mirriam-Webster OnLine, you're
>more closely referring to a "hack" (which was my first impression):
>
>"3a : a person who works solely for mercenary reasons : HIRELING hacks> b : a writer who works on order; also : a writer who aims solely
>for commercial success]"
>...
>Cameron Dorey
>Associate Professor of Chemistry

What about the verb, from which hacker may stem?

Lee, BA (Hons), MSc (Sussex),
Just noticing everyone is using formal sigs these days



Lee Goddard
perl -e "while(1){print rand>0.5 ? chr 47 : chr 92}"

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Preferred PERL Editor

2002-05-10 Thread Lee Goddard




Okay, where do I get Xemacs?

Only kdding - getting it now...

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Why my boss doesn't want Perl...

2002-05-10 Thread Lee Goddard

At 08:58 10/05/2002 -0400, Tillman, James wrote:

>Certainly, but I'll wager there are very, very, very few VB-only programmers
>who deserve the label of "hacker"  ;-)

Hacker in the sense of hacking together bits of other
people's stuff and calling it Art... or their own.

As in newspaper reporters.


Lee Goddard
perl -e "while(1){print rand>0.5 ? chr 47 : chr 92}"

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Why my boss doesn't want Perl...

2002-05-10 Thread Lee Goddard

At 06:52 10/05/2002 -0400, Tillman, James wrote:

>Anyway, I hope all this helps.  For what it's worth, my employer doesn't
>promote the use of Perl either, despite the fact that I use it daily in
>project management tasks to save hours of time and I have put together a
>completely functional Content Management System in Perl that literally
>supports all of our organization's web publishing.

That sounds familiar: I once did a brief contract with a design house
and a very large multinational.  It was just CSS/HTML/JS to within
a pixel, with different content on a page. They expected me to read
a spreadsheet and workout each page. Of course it took 30 minutes
to write a perl script to do the reading and writing, once I'd got the
template done.

That as bad enough. The big company then spent literally millions
on a content management system that would do just what my
30 minute Perl script did -- not even live serving of pages.

Biggest problem I can find with Perl is that it is free, and relatively easy.

I suppose there are a lot of hackers who give Perl Hackers a
bad name, but isn't that the case with VB and C++?



Lee Goddard
perl -e "while(1){print rand>0.5 ? chr 47 : chr 92}"

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Secure platforms DO matter!

2002-05-07 Thread Lee Goddard

At 13:40 07/05/2002 +0200, Bellenger, Bruno \(Paris\) wrote:

>Guys,
>
>Interesting as it may be, maybe this thread should be moved to a more
>appropriate forum ?

Agreed!

lee

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: XMl convertion quickie.

2002-05-07 Thread Lee Goddard


XSLT.

On Java

Okay, I'm OT now, sorry, but unless things have picked
up in the past six months (I'm sure they have) I'd never
recommend Perl for XML conversion.

lee

At 12:23 07/05/2002 +0100, Martin Moss wrote:
>All,
>
>just a quickie, any recommendations for converting from one XML doc to
>another?
>
>regards
>
>Marty
>
>___
>Perl-Win32-Users mailing list
>[EMAIL PROTECTED]
>To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Lee Goddard
perl -e "while(1){print rand>0.5 ? chr 47 : chr 92}"

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Secure platforms DO matter!

2002-05-07 Thread Lee Goddard

At 06:59 07/05/2002 -0400, Flowers, Jay wrote:
>  Are we talking about Windows NT 4.0, Windows 2000, or IIS *.*.
>
>Have you all heard anything about win64?  Do have any faith that MS is
>changing to become a more security aware company?  MS is staking its life on
>.NET and Win64.  They are working hard to change.  *nix has been around for
>a long time, it is rediculous to think that it would not be secure.  MS
>would never release any software if it had to be bug free before release.
>No other software get used by more people, so it is no wonder that more bugs
>are found in it than anyother software.  Point being that there are bugs and
>security flaws in *nix also that have not been found for lack of use.  MS
>plans to use Win64 and .NET to compete with the *nix Java solutions.  Do you
>think that they are going to ignore security as a selling point, for
>themselves or for *nix against them?  MS knows that it HAS TO solve its
>security problems to compete in the enterprise solutions arena.  The have
>the money, the man power, the motivation, and the skill to get it done.  The
>only question is will you all buy it.
>
>Jay Flowers

Certainly MS has to solve its security issues if it wishes to compete with 
platforms that have been established as secure, Unix and OS/400. In my 
limited experience, I've worked on projects for banks and medical 
organisations that have tried all three platforms, and it is the MS 
platform that gets damaged.  Mr Gates knows that I'm not alone in this: he 
has recently publicly stated that MS will focus on security at the 
exclusion of all else.

The question is, can MS be as secure as they need to be, and as they are 
now making every effort to become?

Two years ago, most of us would have said it is impossible unless they 
reworked their OS from the bottom up; the bugs in the Windows OS are not 
simply found more often than in Unix because Win OS is more widely used: 
they are there because MS products have a short RAD-to-shop cycle.

This does now appear to be changing: so perhaps there is hope.  Who (apart 
from Sun, maybe...) would not like to have a secure platform for 
development, deployment, that can also run everyday applications?

We've much to be grateful to MS for -- most PC users in the world would not 
be PC users were it not for MS picking up on and making a commercial 
success of Apple's interpretation of the StarOffice GUI.  Were it not for 
MS "plug-n-play", most of us would be charged inflated prices for 
hardware.  But frankly, even MS have admitted that security is not 
something they have done well.

Lee Goddard



___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Hash of Hashes

2002-05-07 Thread Lee Goddard

At 09:03 07/05/2002 +0100, Simon Oliver wrote:
>Lee Goddard wrote:
> > $i_ama_hash_ref->{ima_key2}->{"I'm a value")="I'm a key";
>
>You swapped a brace with a bracket and didn't you mean this anyway:
>
>$i_ama_hash_ref->{ima_key2}->{"I'm a key"}="I'm a value";

Sure did. That'll teach me to try and be helpful before my coffee. ;-)
And I forgot to say it is a hash reference, not a hash.


>and don't forget, when it get's multidimensional you can drop the ->
>notation so it looks multidimensional too:
>
>$i_ama_hash_ref->{ima_key2}{"I'm a key"}="I'm a value";

Hey, I like the arrow !

lee

Lee Goddard
perl -e "while(1){print rand>0.5 ? chr 47 : chr 92}"

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Hash of Hashes

2002-05-07 Thread Lee Goddard

At 22:17 06/05/2002 -0700, Kevin wrote:
>I am reading a DBI record into a hash reference - my $row =
>$sth->fetchrow_hashref() - I would like to create a hash to hold all of the
>returned rows (or thus, hashes) with the ID being the key, so for example
>
>$returned_rows{$row->{'ID'}} = $row

$I_ama_has_ref = {};
$i_ama_hash_ref->{im_a_key} = "A simple key";
$i_ama_hash_ref->{ima_key2} = {}; # key points to a hash
$i_ama_hash_ref->{ima_key2}->{"I'm a value")="I'm a key";





___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



OT: Web Server Security (was once RE: Stress Test Theory?)

2002-05-03 Thread Lee Goddard


> > Running Apache is more secure than running IIS, but still less secure than
> > if you ran apache on UNIX, Linux, AS/400, OS/2 or any other
> > server operating
> > system. Hence few people reccomending you run ANYTHING on windows in
> > production.
> >
>
>Presuming of course that the server is set up to be secure.  All of those
>OSes can have large gaping holes in their security caused both by admin user
>action and inaction.

Please, look after the archives; please rename threads when your post doesn't
match the subject.

I keep getting all excited that someone had a suggestion, and it's irrelevant.

lee

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Stress Test Theory?

2002-05-02 Thread Lee Goddard

Well... I guess I don't need every reponse; the threshold would do,
though the former would be nicer.  Apache::Bench* wasn't up to it
last time I spoke to the author; he's doing mods as we speak.

But did you mean Benchmark, as in Benchmark?  That would, er,
probably be perfect. I'll have a crack and let y'all know.

Thanks

lee

At 11:59 02/05/2002 -0400, Peter Eisengrein wrote:

>Do you really need to record every event or are you looking for the 
>threshold. I was thinking that maybe you could try using Benchmark with 
>different # of iterations and check to see when performance degrades. Or 
>is that not enough detail?
>
>Anyone know if the Benchmark mod would generate enough of a beating?
>
> > -Original Message-
> > From: Lee Goddard [<mailto:[EMAIL PROTECTED]>mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, May 02, 2002 11:22
> > To: ActiveState's Perl Win32 Users list
> > Subject: Stress Test Theory?
> >
> >
> > Does anyone have any thoughts on stress testing?
> >
> > My scenario is an Apache on Windows (not a good idea, but not my app),
> > a C I script calling a Java middleware app.
> >
> > I need to know at what stage the middleware is flooded/fails
> > to respond.
> >
> > I'm thinking of threading a new process for every request I
> > make to Apache
> > each with its own socket for the middleware's response.
> > My problem is that I need to record all the results without
> > crashing my own
> > system.
> >
> > I imagine Apache is more reliable than MySQL, or my Win32
> > FAT32 filesystem,
> > so that would seem to rule out squirting into a db or dumping files.
> >
> > Should I just hold everything in memory and then store it?
> >
> > If you've done this before, I'd appreciate your thoughts.
> >
> > Thanks in anticipation
> > lee goddard
> >
> > ___
> > Perl-Win32-Users mailing list
> > [EMAIL PROTECTED]
> > To unsubscribe: 
> 
><http://listserv.ActiveState.com/mailman/mysubs>http://listserv.ActiveState.com/mailman/mysubs
> 
>
> >

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Stress Test Theory?

2002-05-02 Thread Lee Goddard

Does anyone have any thoughts on stress testing?

My scenario is an Apache on Windows (not a good idea, but not my app),
a C I script calling a Java middleware app.

I need to know at what stage the middleware is flooded/fails to respond.

I'm thinking of threading a new process for every request I make to Apache
each with its own socket for the middleware's response.
My problem is that I need to record all the results without crashing my own
system.

I imagine Apache is more reliable than MySQL, or my Win32 FAT32 filesystem,
so that would seem to rule out squirting into a db or dumping files.

Should I just hold everything in memory and then store it?

If you've done this before, I'd appreciate your thoughts.

Thanks in anticipation
lee goddard

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: About GoogleSearch

2002-04-30 Thread Lee Goddard

You could always try subclassing the WWW::Search module
- there are plenty of examples:
http://search.cpan.org/search?dist=WWW-Search-Yahoo

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: deploying perl past enemy lines (RE: Why my boss doesn't want Perl...)

2002-04-30 Thread Lee Goddard


>Once again deftly proving what an idiot I am, I butcher a great
>philosopher's name.  The quote was from the work of Lao _Tzu_.  I'm a
>Taoist, not a Maoist, I swear ;-)

We know: we just didn't want to spoil a *beautiful* moment  man

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: :mysql

2002-04-09 Thread Lee Goddard

Hm, that's weird: look what I saw:

PPM - Programmer's Package Manager version 3.0 beta 2.
Copyright (c) 2001 ActiveState SRL. All Rights Reserved.

Entering interactive shell. Using Term::ReadLine::Stub as readline library.

Profile tracking is not enabled. If you save and restore profiles manually,
your profile may be out of sync with your computer. See 'help profile' for
more information.

Type 'help' to get started.

ppm> search DBD::mysql
Searching in repository 2 (ActiveState Package Repository)
No matches for 'DBD::mysql'; see 'help search'.
ppm> search DBD-mysql
Searching in repository 2 (ActiveState Package Repository)
No matches for 'DBD-mysql'; see 'help search'.
ppm> search DBD*
Searching in repository 2 (ActiveState Package Repository)
 1. DBD-CSV  [0.1025] DBI driver for CSV files
 2. DBD-DB2  [0.74]   DataBase Driver for DB2 UDB
 3. DBD-JDBC [0.63]   JDBC proxy driver for the DBI module
 4. DBD-ODBC [0.28]   ODBC Driver for DBI
 5. DBD-Oracle   [1.06]   Oracle database driver for the DBI module
 6. DBD-Ovrimos  [0.12]   DBI Driver for Ovrimos (formerly Altera SQL
  Server)
 7. DBD-pNET [0.1003] Perl network database driver for the DBI module
 8. DBD-RAM  [0.072]  a DBI driver for files and data structures
 9. DBD-Recall   [1.8]Database fault tolerance through replication.
10. DBD-Sprite   [0.13]   Modified version of Sprite to manipulate text
  delimited
11. DBD-SQLrelay [0.1]perl DBI driver for SQL Relay
12. DBD-Sybase   [0.91]   Sybase database driver for the DBI module
13. DBD-XBase[0.161]  Perl module for reading and writing the dbf
  files
14. DBI  [1.14]   Database independent interface for Perl
ppm>

It's not important to me now, since I compiled it. Thanks, though
lee

At 10:41 09/04/2002 -0600, you wrote:
>Hi, Lee.
>
>No, I have the latest build (631). But I did not install
>DBD-Mysql so I don't know if there is a problem with its
>PPD or not. I just ran the search as I was pretty sure
>that I remembered seeing it there.
>
>- Mike
>
>
>-Original Message-
>From: Lee Goddard [mailto:[EMAIL PROTECTED]]
>Sent: Monday, April 08, 2002 3:37 PM
>To: Arms, Mike; [EMAIL PROTECTED]
>Subject: RE: :mysql
>
>
>DBD-mysql?  Yeah: are you using an old version of PPM?
>Ie, not the version shipping with the last AS builds?
>I read *somewhere* that the new versions don't recognise
>the DBD::mysql PPD: only the old ones do.
>
>Thanks for looking!
>
>For the record, there's a nicer copy of DBD::mysql tar ball
>via the MySQL home site -- nicer install script than the one
>on CPAN.
>
>Thanks for looking!
>lee
>
>At 13:34 08/04/2002 -0600, Arms, Mike wrote:
> >I find the BDB::Mysql module available from ActiveState's PPM
> >repository:
> >
> >   C:\>ppm search DBD-Mysql
> >   Packages available from
> >http://ppm.ActiveState.com/cgibin/PPM/ppmserver.pl?urn:/PPMServer:
> >   DBD-Mysql [1.2200] DBI driver for Mysql datasources
> >
> >Isn't this what you want?
> >
> >--
> >Mike Arms
> >
> >
> >-Original Message-
> >From: Lee Goddard [mailto:[EMAIL PROTECTED]]
> >Sent: Monday, April 08, 2002 9:22 AM
> >To: [EMAIL PROTECTED]
> >Subject: DBD::mysql
> >
> >Has anyone got a copy of DBD::mysql compiled for
> >
> >perl, v5.6.1 built for MSWin32-x86-multi-thread
> >Binary build 630 provided by ActiveState Tool Corp.
> >http://www.ActiveState.com
> >Built 20:29:41 Oct 31 2001
> >
> >Or does anyone know where the PPM can be found?
> >
> >Thanks in anticipation
> >lee
> >
> >___
> >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: CGI pm Temp File Problems

2002-03-11 Thread Lee Goddard

At 13:31 11/03/2002 +0100, Thomas Bätzler wrote:
>Lee Goddard [[EMAIL PROTECTED]] asked:
> > "CGI open of tmpfile: No such file or directory"
> >
> > Got this running the latest AS Perl with CGI.pm:
> > the directory C:\temp exists, so CGI pm should find
> > it; form data was encoded correctly and uploaded
> > ok afaik, from IE6 to Win2k IIS.
>
>It would be helpful to have a bit more context, i.e.
>which method call produced the error? What were you
>trying to do?

The context is file uploads: CGI pm creates a temp file when
it receives a 'file' field from an HTML form..

>Assuming you were using CGI.pm's read_multipart(), the
>error message could mean that either no temp directory
>was found or that the ones it found were not writeable
>by the user your CGI code is running under.

Yes, although the temp directory c:\temp is apparently
looked for and does exist, and is writable by me ---
though (agh) I've just thought, it probably isn't writable
by the IIS process

Thanks for encouraging me!

>What you probably should do is create a special temp
>directory for your CGI code, give the web server user
>full access to it and then set the TMPDIR variable in
>the web server users's environment to that directory.

Yes - got their just before reading this: thanks.

>It may be more effort than to change your global temp
>dir's permissions, but then it always pays off to have
>been paranoid when something goes wrong ;-)

Yeah.

Thanks
lee

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



CGI pm Temp File Problems

2002-03-11 Thread Lee Goddard

"CGI open of tmpfile: No such file or directory"

Got this running the latest AS Perl with CGI.pm:
the directory C:\temp exists, so CGI pm should find
it; form data was encoded correctly and uploaded
ok afaik, from IE6 to Win2k IIS.

Any help appreciated
TIA
lee

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: CGI.pm file upload

2002-03-06 Thread Lee Goddard


I'm an idiot.  I set the form to the correct encoding, using a type 
attribute, not enctype.

Deary me time for a holiday.

Thanks for you help!
lee

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Distance between 2 latitudes and longitudes

2002-03-06 Thread Lee Goddard


Damn, that means I'd better get onto it... thanks a bunch! ;-))

Cheers!
Lee

At 11:39 06/03/2002 -0500, Brian Gilkison wrote:
>Lee, Jeff,
>
>There is a formula posted for calculating the "Great Circle" distance
>between two points on a sphere, and an explanation at:
>
>http://www.mercury.demon.co.uk/dist/formula.html
>
>Brian
>
>On Wed, 6 Mar 2002, Lee Goddard wrote:
>
> > At 10:14 06/03/2002 -0600, MOTTER, JEFFREY D. wrote:
> > >Does any know where I can find a script to calculate the distance 
> between 2
> > >seperate latitudes and longitudes?
> >
> > The distance between each line of lat and lon is slightly different:
> > if you can me a list of them, I can write you the script, and add it
> > to the Mapblast module on CPAN
>
>
>___
>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: Distance between 2 latitudes and longitudes

2002-03-06 Thread Lee Goddard

At 10:14 06/03/2002 -0600, MOTTER, JEFFREY D. wrote:
>Does any know where I can find a script to calculate the distance between 2
>seperate latitudes and longitudes?

The distance between each line of lat and lon is slightly different:
if you can me a list of them, I can write you the script, and add it
to the Mapblast module on CPAN

;-)

lee

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: CGI.pm file upload

2002-03-06 Thread Lee Goddard


Everything is fine with my file upload, except

$cgi_pm_instance->upload($upload_form_field_name)

always returns a string and never a file handle.

If no-one knows about this, I'll get in touch with the CGI pm chap.

TIA
lee

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: CGI.pm file upload

2002-03-06 Thread Lee Goddard


Thanks for the example

Seems to suggest that my code was okay, because
I get a related error when running your code:

Can't use an undefined value as a symbol reference at ...

the lines
while($bytesread = read($fh, $buffer, 1024)) {
print $buffer;
}

So, the file isn't uploaded --- but all the other CGI data is.

Huh?  Dead confused. Please help!  Has anyone seen this before?

lee

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: CGI.pm file upload

2002-03-06 Thread Lee Goddard


>   # # would it be faster to do an 's/\//\\/g' to replace all '/' with '\'
>   # # and then just get the index of the final '\'?  Don't know...
>   # # it would make the code cleaner, but it may be less efficient...
>   my $posreg = rindex($in_file_name, "/");
>   my $posback = rindex($in_file_name, "\\");
>
>   my $pos;
>   if ($posreg > $posback) { $pos = $posreg; } else { $pos = $posback; }

How about something like

$input = "D:/something/like/this/get_this_filename.html";
$input =~ /([^\\\/]+)$/ ;
$output = $1;




hth
lee

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: CGI.pm file upload

2002-03-06 Thread Lee Goddard

At 15:58 05/03/2002 -0500, Morse, Richard E. wrote:
>H some of this doesn't look right.
>
>For instance, point 5 -- $file in this case should be the filehandle, 
>which may
>also be the text of the parameter, but I'm not positive on that -- if you want
>the value of the file, try $self->{cgi}->param('file1').

Apparently, according to the POD, it is both of the above

>Also, #7 -- what is $id set to?  This is where you should put "'file1'".

Sorry, yes, it is 'file1'

>Here's some code that I wrote that _does_ work

Thanks, I'll try it.  I've done it many times before without hassle, and 
maybe I was
just tired yesterday

Thanks again,
Lee

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



re:Regexp needed

2002-03-05 Thread Lee Goddard

At 11:20 05/03/2002 +0100, Jorge Goncalvez wrote:

>my ($Path) = $MountsPath =~ /(.+?)cygwin/;
>but I wanted to get rid of the "/".
>because $MountsPath could be c:/cygwin or c:/xyz/cygwin or 
>c:/xyz/zyx/cygwin and
>i wanted $Path = c: or c:/xyz or c:/xyz/zyx .
>And now $Path= c:/ or c:/xyz or c:/xyz/zyx.
>How can I do ?
>thanks.

1. Read the regex POD (perldoc perlre) or better
buy the Programming Perl book and read its great regex pages.

2. Describe what you want to do in your native language

I get: remove the trailing oblique; ie. remove the oblique at the end of 
the string.

3. Translate to Perl:

a. end of string in re is $ operator.
b. oblique in an oblique-delimited re is escaped thus: \/
c. re to remove last oblique is thus s/\/$//

4. add it to what you already have.

hth
lee

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Perl not finding modules... some of the time

2002-02-12 Thread Lee Goddard

Sounds to me like you've got two Perl's installed, one linked to PWS, one 
to your PATH variable.

Check the ScriptMap registry key you set when you installed PWS against the 
PATH enviroment variable (by typing SET PATH at a command prompt).

hth
Lee

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Text flow in PDF

2001-10-12 Thread Lee Goddard

> From: Morse, Richard E [mailto:[EMAIL PROTECTED]]
> Sent: 12 October 2001 13:16
> To: 'Lee Goddard'
> Subject: RE: Text flow in PDF
> 
> 
> As I understand it, PDF does not define the concept of a paragraph -- PDF
> works with characters, and it is up to the program to use the font metrics

That's exaclty my point! - is there a perl mod that does this?!

> to determine how wide the characters are, and thus where the line should
> break.  If you can determine how to do a flowed paragraph, it would be way
> cool -- I wanted to do some layout stuff, but I couldn't figure out how to
> access the font metrics from Perl, so I wound up doing ugly guessing games
> and tricks with monospaced fonts...

Ugh!  Formatting Objects and XSLT is a better way to go
but I guess I'll end up doing the font metric stuff one
day - if you don't beat me to it (please, beat me to it!).

cheers
lee
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Text flow in PDF

2001-10-12 Thread Lee Goddard

Not really - all the PDF modules I've seen seem
to allow me to place text on the page, but only
at co-ordinates.  I'd rather be able to place say
four paragraphs, and have the module flow them so
that they fit defined margins, that widows and
orphans are controlled, page breaks nicely set out,
y'know

BTW, my ISP (BusinessServe.co.uk) have decided to
charge all their customers £80 to access their
accounts via the internet: obviously it's a point
of principle, I'm not paying, no I'm not getting
pop3 atm.  Grrr.!

cheers,
lee




-----------
Lee Goddard: LBLtd: Perl/XML/Java/C Internet & AI
---
It is true, I never assisted the sun materially in
his rising, but, doubt not, it was of the last
importance only to be present at it. - Thoreau, *Walden*

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of
> Oliver Manickum
> Sent: 10 October 2001 10:28
> To: [EMAIL PROTECTED]
> Subject: RE: Text flow in PDF
>
>
> Hey Lee,  Are you talking about Editing the PDF to format it ?..   - Olly  
>-- From: Lee Goddard
> [mailto:[EMAIL PROTECTED]] Subject: Text flow in PDFI know about Formatting 
>Object and don't have time to set up
> the servers - is there another way to flow text in a PDF doc?  Auto-paragraphing, 
>etc?  I've looked at all the PDF::*
> pods, and seen nothing - is it my job to write them for CPAN...?  TIA lee 
>___
> 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: Exception handling in Perl

2001-09-28 Thread Lee Goddard

Thanks, yes: that's what I've always done,
just need something more refined.

Ta
lee
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



OLE and progID

2001-09-28 Thread Lee Goddard


Sorry - just ignore that last post.
I didn't read the article properly.
That time of day again

lee
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



OLE and progIDs

2001-09-28 Thread Lee Goddard

http://www.perl.com/pub/a/2001/04/17/msxml.html

is the Perl.org article on using Perl with MSXML.
Very nice, very goo, but it assumes that the
parser is installed in "side-by-side mode":
"The only thing that we need to know is the progID for the MSXML parser. ... MSXML 
offers version dependent and version independent
progIDs depending on the method of the installation. Since we have installed MSXML in 
side-by-side mode, we will need to use the
version dependent progID."

Could someone please let me know how to find out the version
independent progID?

Thanks in anticipation
lee

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Exception handling in Perl

2001-09-28 Thread Lee Goddard

Just found a need for exception handling on a big
live project with an potentially nasty PM. Does anyone
have any experience of the Exception modules?  Any good?
Bad?  Better ideas?

Your input would be much appreciated!

tia
lee
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Lack of docs for "unless"?

2001-09-27 Thread Lee Goddard

> > perldoc -f unless
> >
> > > No documentation for perl function `unless' found
> >
> > Surely not correct?  Should I write them?!
> >
> 
> While you're at it you might as well consider:
> 
> perldoc -f if
> 
> No documentation for perl function `unless' found
> 
> Not every perl construct is a function.

That's right.  So, should I do 'if' or not?!
I guess you'd be amazed what -f turns up, though.
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



My beautiful sig

2001-06-26 Thread Lee Goddard

Hey guys - thanks for everything, *BUT*

Behalf Of Tim Hammerquist (Sent: 26 June 2001 01:06):
> The syntax breaks on my box (MDK linux 7.1; Perl 5.6.0; bash shell)

Lee
---
Obligatory perl schmutter .sig:
perl -e "print rand > 0.5 ? q/\\/ : q\/\ while 1"
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



  1   2   >