RE: PerlTk: problem with notebook and canvas

2007-09-20 Thread Wagner, David --- Senior Programmer Analyst --- WGO
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Burgaud Sent: Thursday, September 20, 2007 14:49 To: perl-win32-users@listserv.activestate.com Subject: PerlTk: problem with notebook and canvas

RE: PerlTk: problem with notebook and canvas

2007-09-20 Thread Wagner, David --- Senior Programmer Analyst --- WGO
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Burgaud Sent: Thursday, September 20, 2007 14:49 To: perl-win32-users@listserv.activestate.com Subject: PerlTk: problem with notebook and canvas

RE: hash table question

2007-08-08 Thread Wagner, David --- Senior Programmer Analyst --- WGO
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Funk Sent: Wednesday, August 08, 2007 14:59 To: perl-win32-users@listserv.ActiveState.com Subject: hash table question What exactly

RE: Command line switches aren't recognized

2007-06-15 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Look at folder options and then file types. Check pl to insure that Open has something like: If you have any problems or questions, please let me know. Thanks. Wags ;) David R Wagner Senior Programmer Analyst FedEx Freight 1.408.323.4225x2224 TEL 1.408.323.4449

RE: How do I know where my Perl script is running?

2007-05-15 Thread Wagner, David --- Senior Programmer Analyst --- WGO
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Townsend Sent: Tuesday, May 15, 2007 08:33 To: perl-win32-users@listserv.ActiveState.com Subject: How do I know where my Perl script is running?

RE: Regular expression question

2006-08-01 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Title: Regular expression question From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Cai, Lucy (L.)Sent: Monday, July 31, 2006 17:21To: Cai, Lucy (L.); perl-win32-users@listserv.ActiveState.com; perl-unix-users@listserv.ActiveState.com; [EMAIL PROTECTED]; [EMAIL

RE: Finding partly duplicated records

2006-05-08 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: Thanks for the replies so far. I am going to respond to this one for all of them up to now. This approach is very good for the problem with only two data elements on a line, but it seems to require that I know the duplicate entries when I write the code. I can

RE: Sort not fixing order in equivalent subsequences

2006-05-05 Thread Wagner, David --- Senior Programmer Analyst --- WGO
I don't believe you want to rely upon the order, butr add the extra sort to for the key so you know and do not leave it to the current setup and with the next release changes. Wags ;) -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Joe

RE: Easy One

2006-05-01 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: Real simple, I have a string, $a for arguments sake, that contains a single word. The word will always have exactly 8 characters in it, most likely something like ABCD1234. I need to split this up into two strings ($b $c), the first string needs to contain

RE: Replace Leading Spaces

2006-04-07 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: Using a regex, I want to replace each leading space-character with a corresponding zero-character on a one-to-one basis. For an example string: My $string = ' 259.00 '; Note that I don't want to change the trailing space character. The resulting string would

RE: Efficiency

2006-04-05 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: Since Efficiency seems to be the topic of the day, My situation, I have an array filled with 8-character strings, a few thousand of them. First 4 chars are letters, last 4 are numbers. Examples - abcd1234, zyxw9876, etcc. The letters portion is a prefix,

RE: Efficiency

2006-04-05 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: Okay, Here's what I've come up with: -- @list = (aacs1110, brbt4332, rtxa4320, aacs2000, brig5621, brbt5220, nbvc); @list = sort @list; foreach $item (@list) { $itemPref = substr($item, 0, 4); $itemVers = substr($item, 4);

RE: Efficiency

2006-04-05 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Ng, Bill wrote: That's incorrect though, since your output shows two copies of aacs and brbt ... Bill -Original Message- From: Wagner, David --- Senior Programmer Analyst --- WGO [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 05, 2006 5:02 PM To: Ng, Bill; perl-win32-users

RE: Regex Needed

2006-03-24 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: Hello, I am looking for help on a regex that examines strings such as xxxN yyy sssNNN xxxN yyyNyyy sss xxxN yyyNyyy ssN and returns only the sss part? N is always a numeral, and s is always alphabetic. Here is what I have so far as an

RE: Reg Expression Help

2006-03-23 Thread Wagner, David --- Senior Programmer Analyst --- WGO
-Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Scott PurcellSent: Thursday, March 23, 2006 12:05To: Perl-Win32-Users@listserv.ActiveState.comSubject: Reg _expression_ Help Hello, I have a regular _expression_ in which I am

RE: How to best replace one string with another in a text file

2006-02-28 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: Hello, I want to open a text file, look for a specific string, replace it with a new string, and write the line out to another file. For lines not containing the specific string, I want to write out as is. I was wondering if it is possible to do it with a map or

RE: Re: Tri-grams?

2006-02-22 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Unclear in that are you saying? Is a__ where _ is a space is valid or can three spaces be valid? So are you working with only alpha and spaces or alpha, numbers and spaces? Wags ;) -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of amit

RE: Some Help please

2006-02-16 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: Hi, I am calling a script with in a script and pass a parameter to it. The recieving script won't see the passed parameters. here is what I am doing: #defiend in the calling script my $termPort = 'port1'; system 'xterm -bg yellow -fg black -rightbar -hold -T

RE: Testing for Directories

2006-02-08 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: What is the easiest method to detect whether or not a directory exists? I will need to create the directory/subdirectory if it is not already present. The file test -d does not seem to do the trick. Is there a quick and low-overhead method of doing this without

RE: Sort question

2005-12-16 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: Hi Guys, I have an array of values. How can I sort these values that has a non numeric character [ _ ] in it? What I did was parse the numbers before the _ character and then perform a number short on those value, but there must be an easier way? Any help is

RE: cd the cmd shell from perl (as can be done from bat file)

2005-10-27 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: Hello, When a .bat file with just the line: cd c:\some\where is executed from the Windows cmd shell, then when the .bat file terminates, the directory of the shell would have changed to c:\some\where. How do I get the same effect after running a

RE: Regex

2005-09-20 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: I thought this was working, but my logs just showed a case where it seems not to do what I want. Why does: $OK_body=($body=~/library\s*?card\D*?(\d{7})\D/i) ; Not become true when $body contains: Library Card: 0240742 Just possibly there's some dodgy html or

RE: help with getting file stats

2005-07-20 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: I am trying to get the file stats I found this code in ch8 of perl cookbook ( $dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime, $mtime, $ctime, $blksize, $blocks ) = stat($filename) and read the man page for stat and perlfunc but cant

RE: Test if a string is a number?

2005-06-29 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: Hi folks, I have a seemingly simple problem, but I can't find a satisfying solution. I have a function which tests to see if a value represents what I want to call true. Here's a simplified version: if ($val =~ /true/i || $val =~ /t/i || $val != 0) { return

RE: list acting up

2005-05-31 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: Has anyone else been getting kicked off the list over and over again? I keep getting suspended for too many bounces but all my other mail seems to be getting here just fine. It's just everything from ActiveState that is causing problems. Now if I don't get any

RE: regex and map()

2005-05-09 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: Im trying to sort out why the last line in the routine tokenizer() fails to strip off the trailing double quote for all but the last token. AFAICT, none of the tokens have any newlines - so I'm at a loss as to why it does not do what is expected - (this function is

RE: FTP modules

2005-04-28 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: Does anyone running Perl on Windows recommend a module for FTP? I have tried Net::FTP::Common, but I can't get it to work and there isn't much in the way of documentation. If you have some sample code that retrieves a file from an FTP site, it would be really helpful

RE: Running Perl script without a command window

2005-04-14 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: I'm running a perl script that checks the viability of a server. I have the script scheduled to run every 5 minutes. That means every five minutes I have a command window flash on the computer as the script is being run. Is there any way to keep this command window

RE: Comparing strings

2005-04-11 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: I am working with huge ASCII text files and large text fields. As needs and wants have changed, I will be reprocessing data we have already gone through to see if more records can be extracted. I will need to compare strings to ensure that records I am inserting

RE: Zip Enlightenment

2005-01-21 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Title: Message use Archive::Zip Doc is sufficient and works very well for me. Wags ;) -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Gardner, SamSent: Friday, January 21, 2005 13:53To: 'Perl-Win32-Users@listserv.ActiveState.com'Subject: Zip

RE: Win32 process auto-restart on error/crash or kill

2004-12-03 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: Hi all, how do i automatically get a script to restart itself on error/crash or kill? I tried $SIG{INT}, but that only works with Ctrl-C, in a console. Lets say i were to kill the process using the Task Manager (end process). How do I get the script to

RE: string to time

2004-11-03 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: given a date string something like 11/03/2004 09:30:27 Is there a Perl mod that will turn this into peril's time() in seconds from day zero? Thanks You would need to parse the data which you could do in two steps: # Assumes you date/time is in $_

RE: Perl OO

2004-09-29 Thread Wagner, David --- Senior Programmer Analyst --- WGO
For anyone to help, we will need to see a snippet of code to get an idea otherwise I don't think you will get a lot of help. Give the group something to work with. Wags ;) -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Bharucha, NikhilSent:

RE: comparing srtings

2004-06-29 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: I am trying to Compare 2 strings for an if statement in an admin script. $slurp is an entire file, and $file is a name. what i would like to do is compare the 2, basicly saying if this = that do this otherwise do this. i have the if statement and stuff right i just

RE: Chop!

2004-06-18 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: Greetings, Suppose I have a string like $sequence = [sas]; How can I get rid of the leading and trailing brackets and just have $sequence = sas; $sequence =~ s/\[([^]]+)\]/$1/g; This will remove it. Wags ;) One way I thought of was : chop($sequence);

RE: parsing large file for character usage

2004-06-01 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: Can anyone seem to think of a less memory intensive way of doing this (besides chopping the file up into smaller chunks -- which is my next step unless I receive a better option? The txt file is 335MB. The column and row delimiter can change, but needs to be an

RE: Convert string Lenght to 3 Hex Values

2004-05-20 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: Greetings perlers, new PSQ for you, so please bear with me. I'd like to convert the lenght of a string into 3 Hex Values, eg. if length($str) == 5 it would print 00 00 05 You can use sprintf and %x along with a size, though I am thinking you want it

Incorrect time being outputted ( off by 8 hours )

2004-04-21 Thread Wagner, David --- Senior Programmer Analyst --- WGO
I have looked at the problem machine(XP Professional) and looked at two others (one running xp prof and one w2k). They both come back with the correct time. The time on the machine is correct, but for 0927 PDT I get 1627 PDT. Now I get the incorrect error whether I use MKS Kornshell

RE: Incorrect time being outputted ( off by 8 hours )

2004-04-21 Thread Wagner, David --- Senior Programmer Analyst --- WGO
$Bill Luebkert wrote: Wagner, David --- Senior Programmer Analyst --- WGO wrote: I have looked at the problem machine(XP Professional) and looked at two others (one running xp prof and one w2k). They both come back with the correct time. The time on the machine is correct, but for 0927

RE: Array Hash Reference Confusion

2004-04-06 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: I'm having another senior moment, apparently, as the following shows: my %DW_AutoSearch = ( 0x = [ Off, On, Off, Off ], 0x0004 = [ Off, Off, On, Off ], 0x0005 = [ Off, Off, Off,

RE: Send Hex values and ASCII Values over a TCP Socket

2004-03-12 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: Hello perlers, I'm trying to send tome information over a TCP Socket, but I have to send the length of the package as Hex, and the rest as ASCII. Could someone explain me how to do that please? I've converted the length to Hex but it always sends everything as

RE: Windows not passing args. in @ARGV - why not???

2004-03-08 Thread Wagner, David --- Senior Programmer Analyst --- WGO
I need some help with a dumb problem I've got:For some reason, arguments from the Windows cmd.exe command line are no longer being passed into my Perl scripts via @ARGV.Used to work fine.I tried removing Perl. Reinstalled (ActiveState) Perl (5.8.3.809-MSWin32-x86.msi) (on XP). No help!Anyone

Using RTF within email tto Outlook

2004-03-08 Thread Wagner, David --- Senior Programmer Analyst --- WGO
I have asked this question, but received no clear cut reply on how to do this( I belive it is possible ), but usnure how to accomplish the task. Within Outlook you can have Rich Text as an email type. I can write the message to a file and place the extension .rtf as part of the file

RE: Regex matching of patterns in variables

2004-03-03 Thread Wagner, David --- Senior Programmer Analyst --- WGO
hey all, Scratchin' my head on this one for a couple of hours now, looking at camels. sheep and other documentation creatures to no avail. I'm trying to match a pattern that's already (must be) in a variable like so: $var = coyote; while (FILE) { if ($_ =~ /$var/i) { print $_ .

RE: File Monitoring

2003-12-19 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: Subject: File Monitoring I've searched quite a bit for the illusionary AdvNotify and I'm The writer of AdvNotify just seemed to disappear. At least any list that I was on, no one an inkling what happened. I used the AdvNotify and it was very slick and I

RE: subroutine name

2003-12-19 Thread Wagner, David --- Senior Programmer Analyst --- WGO
It is the caller subroutine. I use it for printing start and stop times for particular subs. So the print sub references who called him by something like: #!perl -w sub a { c; $caller = (caller(0))[3]; $caller =~ s/.*:://; print 0 I am $caller\n; }; sub b {c}; sub c {

RE: Trying to install Perl on XP Professional -- getting dialog error 2755, 110

2003-12-16 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Sorry to be so slow in responding. What happened was that I was working with XP for the first time and made a security change and I did it at the wrong place. So basically ended up with no real access to the machine. Ended up having to have the machine rebuilt. I just a few

RE: Seemingly simple???

2003-12-10 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: Subject: Seemingly simple??? Hello, I have a small problem, which at first seems simple, but has proven to be a bit of a hair puller. A collegue and I are importing some windows formatted ascii files (onto our linux systems) and extracting certain string

RE: newline...be gone

2003-10-08 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: Subject: newline...be gone Greetings, I have a question that probably easy to many... How can I get rid of the newline at the end of $line (which transfers to $remainder after splitting)? If it is not off your system and you are getting the data from

RE: Using scientific notation as a numeric value within a CVS file?

2003-09-30 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Hanson, Rob wrote: Unless you need something specific, you can use them as is since those are valid numbers in Perl... print 9.12e-002 * 1; # prints 0.0912 print 9.12e-002 * 2; # prints 0.1824 print 9.12e-002 + 100; # prints 100.0912 These all give correct answers. Did you need to

RE: Reg Expression missing last char?

2003-09-17 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Capacio, Paula J wrote: I am using $1 and $2 to retain data from a matched regular expression. I expect $1 to contain the KEY ID and $2 to contain USER NAME, but $2 Pauls, If you put a slash between $1 and $2, you will find out that it is not doing what you think. You will find that $1

Using Perl to send Text messaging to Mobile Phone

2003-09-08 Thread Wagner, David --- Senior Programmer Analyst --- WGO
I looked on Activestate site and found a Python script, but nothing from Perl. Also looked on CPAN, but nothing stood out or I am using the wrong words in search. Anyone done it? I am attempting to go to ATT WireLess. I have a running application, but want to have a separate

RE: Regex Help Needed

2003-09-02 Thread Wagner, David --- Senior Programmer Analyst --- WGO
I wanted to use tr but was uanble to accomplish the task that way. So I used regex like the following: use strict; my %MCTWW = qw(m -1 e -1 v -1 q -1 g -1 n -1);my $MyCharsToWorkWith = \%MCTWW; $_ = '--mepqgn '; if ( ! /-{1,2}(\S+)/ ) { printf "Expecting a hyphen or two floowed by non

RE: Where am I going wrong with OLE and MS Word?

2003-09-02 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Brad Smith wrote: I have written a little app, where I would like to dynamically create a directory of resource providers, using Perl OLE and Word10. I would like the directory to contain: 1. A full page color graphic 2. Table of Contents 3. Contents: each resource provider listed on a

RE: Character Class Question

2003-08-04 Thread Wagner, David --- Senior Programmer Analyst --- WGO
steve silvers wrote: No... This is not the problem.. I wrote a small snippet to show the problem.. You will have to anchor in some way or otherwise you will get the H for HH. So depending on how you $a , the you could do ^(H|V|P|BI|B)$ or if if could be a space or some other character,

RE: Unsure How To Automate

2003-06-27 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Peter Guzis wrote: 3) Use Win32::AdvNotify if you can find it Peter Guzis Web Administrator, Sr. ENCAD, Inc. Be careful on this path, since the author is not around any more ( disappeared or at least I have never heard what happened to him). I use it but it is a very static

RE: get the complete path to a file

2003-03-27 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Olaf Seywald wrote: Hello, I want to find (like in unix) files with the complete path. How can I do this. Here is a starting portion for you: #!perl -w use File::Find; # calls wanted() for each file found find(\wanted, 'topdirectoryyouwanttostartat'); sub wanted { # check to

RE: Hiding STDIN (keyboard) while typing

2003-03-20 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Gregory, Carlton wrote: Good Day All, I was wondering if anyone has previously run a Perl script that hides the STDIN from being printed to the STDOUT (console window) while typing? As in when getting prompted for a password. Is there a Console module maybe Win32::Console?

RE: blanks from hell!

2003-02-15 Thread Wagner, David --- Senior Programmer Analyst --- WGO
You might try: system("secondapp $switches \"$filelist[$i]\"") which should make the second argument the filename regardless of whether it has spaces or not. Wags ;) -Original Message-From: Steve [mailto:[EMAIL PROTECTED]]Sent: Saturday, February 15, 2003 09:43To:

RE: Interacting With Exchange..

2003-01-30 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Barlow, Neil wrote: Hi experts, I am trying to write an inbox monitoring script that will monitor an inbox on exchange and alert if there are any new mails. I have been looking at Mail::POP3Client and Mail::POP3Client and these modules do successfully connect but the count and delete

RE: Perl Recursive

2003-01-03 Thread Wagner, David --- Senior Programmer Analyst --- WGO
I had one using File::Find. The only thing it does not do is create new directory in the base directory. I made up a folder name called junker(change to what youneed)and created that. Hopefully a starting point. #!perl -w use File::Find;$diff = 0;get_time(); my $MyStartTime = sprintf

RE: Convert int to bitstring

2002-12-18 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Title: Convert int to bitstring Here is one using printf and you could use sprintf: $_ = "255.255.255.224"; foreach ( split(/\./, $_ ) ) { printf "%b\n", $_;} Output: 1110 Wags ;) -Original Message-From: Bullock, Howard A. [mailto:[EMAIL

RE: sorting version numbers

2002-12-02 Thread Wagner, David --- Senior Programmer Analyst --- WGO
uncertain how you were getting the data, but here is one shot: my @MyData = qw(4.0.0.10 4.0.0.9 4.0.1.0); foreach my $MyKey(sort {$b-[1] = $a-[1] || $b-[2] = $a-[2] || $b-[3] = $a-[3] || $b-[4] = $a-[4] } map{[ $_ ,

RE: executing plx -- seems to be a common problem

2002-10-13 Thread Wagner, David --- Senior Programmer Analyst --- WGO
to be a common problem Any idea how to make ActivePerl set this on install? Maybe it should be put into the source tree? Josh Zeckser Digitizing [EMAIL PROTECTED] 503-419-5036 http://www.nobeltec.com -Original Message- From: Wagner, David --- Senior Programmer Analyst --- WGO [mailto:[EMAIL

RE: Regexp with 0

2002-09-18 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Title: Regexp with 0 Change to an if: if ( CARACTER[$i] =~ /^(a|b|1|0)/g; ) { #true }else { # false } Wags ;) -Original Message-From: "Muñoz O, Normann (Valparaíso)" [mailto:[EMAIL PROTECTED]]Sent: Friday, September 06, 2002 14:36To: [EMAIL PROTECTED]Subject: Regexp