Re: Fixing a one-liner (global binmode?)

2007-09-17 Thread Bill Luebkert
Suresh Govindachar wrote: Hello, The following dos2unix one-liners perl -i~ -pe s/\r\n$/\n/ files fails in windows. I think it is because when perl writes the resulting file, it re-inserts \r\n! The following code almost works: $^I = '~'; my

Re: Fixing a one-liner (global binmode?)

2007-09-17 Thread Bill Luebkert
Suresh Govindachar wrote: The following worked -- didn't need to turn off warnings. Not sure why, I get a warning on using ARGVOUT only once. #!/usr/bin/perl BEGIN {(*STDERR = *STDOUT) || die;} Not sure why you want the above. use diagnostics; use warnings;

Re: Fixing a one-liner (global binmode?)

2007-09-17 Thread Bill Luebkert
Suresh Govindachar wrote: Steve wrote as a deprecated top post: $Bill wrote: Suresh Govindachar wrote: [almost working code] Try: $^I = '~'; no warnings 'once'; while () { binmode ARGVOUT if $. == 1; print; } The following worked -- didn't need to

Re: Fixing a one-liner (global binmode?)

2007-09-17 Thread Bill Luebkert
Suresh Govindachar wrote: a) The stuff at the top is common to all perl scripts I write, and it is too much trouble to tweak them on a per-script basis. b) The shebang line is when the script needs to be run on linux. That's pretty obvious. :) c) The stderr to stdout

Re: Big endian C to perl on x86 of binary file into structure

2007-09-16 Thread Bill Luebkert
$file: $! ($^E); # this is line 10 __END__ Uncaught exception from user code: Bareword O_RDONLY not allowed while strict subs in use at foo.pl line 10. Execution of foo.pl aborted due to compilation errors. -- ,-/- __ _ _ Bill

Re: Big endian C to perl on x86 of binary file into structure

2007-09-15 Thread Bill Luebkert
Suresh Govindachar wrote: Hello, The following code is meant for a Big-endian processor running linux. The code reads binary files and assigns values to structures. I would like to read the same data files in perl on Windows on little endian x86. Any tips on doing the

Re: tk stay on top problem with perlapp for win32

2007-09-06 Thread Bill Luebkert
Spencer Chase wrote: Greetings perl-win32-users, Providing a script the demonstrates the problem as per $Bill's suggestion. The script runs fine but fails with the above listed error message when I try to make an exe with parlapp. Here is the script. The error messages and portion of

Re: Any hint when 5.10 will be out?

2007-09-05 Thread Bill Luebkert
Foo JH wrote: Something interesting to look forward to: 'print' will be replaced by 'say' Major change, I'll say! I seriously doubt that's true - maybe augmented, but not replaced. Replacing print would break to many scripts/modules. 田口 浩 wrote: New month, And I hope File::Slurp will

Re: Error message not showing up from Net::SMTP

2007-09-05 Thread Bill Luebkert
Sisyphus wrote: - Original Message - From: Suresh Govindachar [EMAIL PROTECTED] . . sub auth { my (\$self, \$username, \$password) = [EMAIL PROTECTED]; eval { require MIME::Base64; require Authen::SASL; } or \$self-set_status(500, [Need MIME::Base64 and

Re: stayOnTop?????????

2007-09-05 Thread Bill Luebkert
Spencer Chase wrote: Greetings perl-win32-users, Not sure what group to post this to so I am trying this one first. I have a perl TK script that uses StayOnTop. It works fine when I run it from Komodo but when I try to make an exe with PerlApp, it does not work. I have installed StayOnTop

Re: win32::daemon Pod::Webserver ???

2007-08-30 Thread Bill Luebkert
Michael D Schleif wrote: I installed Pod::Webserver executing podwebserver from CLI works OK; except that it requires keeping open a Command Prompt window. So, I thought that I could use Win32::Daemon to create and run it as a service ; The service installs successfully. However, it

Re: How do I read the Response Headers form URL post?

2007-08-24 Thread Bill Luebkert
Mark Funk wrote: Folks, How do I read the response header information. I am using LWP gets ... my $response = $ua-get($baseurl/$home); $home_page = $response-as_string; How would I code to read the Response headers? Something like this should work: print Headers: \n; my %hash

Re: finding the window

2007-08-09 Thread Bill Luebkert
Daniel Burgaud wrote: Hi Is there a way for Perl (GUITest or other modules for that matter) to know that a window is owned by a particular program? GetWindowThreadProcessId might help you. Currently, I am using Win32::GUItest my @windows = FindWindowLike(0, program name, undef,0,0);

Re: Changing Group ID

2007-08-02 Thread Bill Luebkert
HOPE Bill wrote: Hi, I'm either not understanding (probable) or I cannot find how to change the group membership of the current executable such that files created by the process have the group ownership I need. setpgrp() doesn't seem to be it. Ideally, it would work on Windows also.

Re: Add password generate ZIP file

2007-07-02 Thread Bill Luebkert
田口 浩 wrote: Hello, Anyone has a guide to add password generate ZIP file with Perl? Archive::Zip doesn't support password, does it? I have over 1,000 file as a plain text files. And I must add each password and convert into ZIP files. The password is calculated from each file name. The

Re: Perl-Win32-Users Digest, Vol 11, Issue 15

2007-07-01 Thread Bill Luebkert
Ozette Brown wrote: All, To remove CRTL-M's try this: perl -pi -e 's/\cM$//g' file.pl And, it's done. 1) You could have stripped most of that digest and put your reply after whatever portion you were responding to rather than top-posting. 2) If you had tested the above cmd, you would

Re: Changing space to escaped space

2007-06-19 Thread Bill Luebkert
John Townsend wrote: I’m trying to change a space to an escaped space. I've tried something like this: $string = ._\\agmptestapp.exe_ file://\\agmptestapp.exe -i ._\\performance_in\\3Pages3Squares.pdf_ file://\\performance_in\\3Pages3Squares.pdf -o ._\\performance_out\\_

Re: Command line switches aren't recognized

2007-06-15 Thread Bill Luebkert
DC Brian wrote: Hi. First of all, I am a total newbie to Perl, so forgive my ignorance. I am using someone else's script here; let's call it foo.pl. Without going into too much detail about the code or whether it works correctly, let's just say that we have two near identical WinXP PC's

Re: perltidy and new line before comment

2007-06-11 Thread Bill Luebkert
田口 浩 wrote: Hello, I can't learn much from perltidy help page. One is I don't like new line before such a comment, # call some sub. Someone would show me the correct switch? ... C:perltidy -l=200 -i=2 -pt=2 -ce -st T1.pl Try: perltidy -l=200 -i=2 -pt=2 -ce -st -nbbc T1.pl

Re: perltidy and new line before comment

2007-06-11 Thread Bill Luebkert
田口 浩 wrote: Try: perltidy -l=200 -i=2 -pt=2 -ce -st -nbbc T1.pl Thanks, it's what I'm loooking for, No BBC! -:) perltidy help is somewhat difficult to understand for non English speaker, isn't it? I didn't read the help. It says it should be here:

Re: Win32-API aborting mid-application

2007-05-30 Thread Bill Luebkert
, ...) = unpack 'C32S4I...', unpack ('P', $mode);; I've never dealt with a ptr to a ptr so ... -- ,-/- __ _ _ Bill Luebkert Mailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /-- o // // Castle of Medieval Myth

Re: Win32-API aborting mid-application

2007-05-29 Thread Bill Luebkert
Adam R. Frielink wrote: I have hit a road block using the Win32-API module. I've gotten a working tool which allows me to modify the contents of the Crystal Reports RPT file in memory using the API interface. Unfortunately, everytime I attempt to access a particular method, my application

Re: Problem with Win32::GetOSVersion()

2007-05-23 Thread Bill Luebkert
Jan Dubois wrote: You are printing the PRODUCTTYPE value instead of the ID. Use $s[4] instead of $s[-1]. Also note, if you're running in XP compatibility mode, you'll get 5 instead of 6 for major. ___ Perl-Win32-Users mailing list

Re: GoldMine DLL access

2007-05-21 Thread Bill Luebkert
Sisyphus wrote: - Original Message - From: Paul Rogers [EMAIL PROTECTED] . . While I've worked plenty in perl I've never had to connect to/use a DLL. GoldMine's API uses a DLL. While of course they have plenty of docs for VB and C++, they have none for perl. If the C++ docs are

Re: GoldMine DLL access

2007-05-21 Thread Bill Luebkert
Sisyphus wrote: On the other side of the ledger, I think that Win32::API still requires that the dll has been built using __stdcall calling convention, whereas that's not a requirement with Inline::C/Inline::CPP. (Perhaps things have changed on that score. I think there's a version of

Re: Perl to move mouse and click

2007-05-19 Thread Bill Luebkert
Daniel Burgaud wrote: Hi, I want Perl to move the mouse cursor to a particular X,Y coordinate, and then Left Click. How is this done? Try: use Win32::GUITest; ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To

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

2007-05-15 Thread Bill Luebkert
Sisyphus wrote: - Original Message - From: Wagner, David --- Senior Programmer Analyst --- WGO [EMAIL PROTECTED] $0 holds the name of the file executing your script. It appears as fully qualified name. No it doesn't. It may or may not be fully qualified. I don't think

Re: Perl Report Format Question

2007-05-08 Thread Bill Luebkert
Dax Games wrote: Why don't I Get IP addresses in the IP Address column of the report below. The data is there if I do a print after the split of the value in %GAA_Up. I get: PS: I see no need for using format for this report - (s)printf should suffice. Always supply a runnable test case:

Re: DBM file handles close-on-exec ?

2007-05-07 Thread Bill Luebkert
[EMAIL PROTECTED] wrote: Hi! I have a Perl script that opens a number of DBM files. It also starts other programs via calls to system. I recently found out that the handles to the DBM-files seem to be inherited by the newly started process. I would like to avoid this. Does anybody know how

Re: Alert if box not checked

2007-04-18 Thread Bill Luebkert
Jerry Kassebaum wrote: Friends. I want to pop up an alert if a checkbox isn't checked. Below is the code I have so far. Notes: 1. The cgi page is actuatlly at http://www.biblescramble.com/Esther/scriptCheck.cgi 2. x.cgi doesn't exist. This doesn't get that far. I'm just working on

Re: filefield

2007-04-12 Thread Bill Luebkert
Jerry Kassebaum wrote: I tried my $tmpdir = /tmp; and my $tmpdir = $ENV{TEMP} || C:/tmp; and my $tmpdir = $ENV{TEMP} || /tmp; Same error: Software error: CGI open of tmpfile: Permission denied Things to look at or try: 1) What are the perms on /tmp ? 2) What user are you

Re: Need OLE COM/Variant help

2007-04-12 Thread Bill Luebkert
[EMAIL PROTECTED] wrote: Hi List, I am using Win32::OLE to access a custom COM interface (Secure FTP Server by GlobalSCAPE). Mostly I have been successful after much reading, experimentation and gnashing of teeth but how to retrieve a VARIANT array totally escapes me. The only interface

Re: filefield

2007-04-11 Thread Bill Luebkert
Jerry Kassebaum wrote: Friends, I'm hoping I'm missing something obvious. I have a cgi page with checkboxes, radio buttons, textareas working. However, I'm trying to add a filefield and having trouble. I have a print statement, followed by a few lines ending in commas. Later I have:

Re: filefield

2007-04-11 Thread Bill Luebkert
Jerry Kassebaum wrote: Bill et. al., This is a little embarrasing. Bill, you helped me with a similar problem back in December, but I never quite got it. Below is the code you gave me. But when I browse to a file and submit, I get the error: Software error: CGI open of tmpfile:

Re: Redirecting STDOUT

2007-03-30 Thread Bill Luebkert
Chris Rodriguez wrote: Hi everyone, I saw the following on another PERL list-serve: If you are on windows, then see perlfaq8 if ActiveState perl for how to redirect STDOUT and STDERR when doing backticks. I'd like to be able to capture STDOUT as a string. But nothing on perlfaq8 struck

Re: Socket programming / Network connectivity ?

2007-03-28 Thread Bill Luebkert
Theisen, Gary wrote: Hi all, I'm obviously new to socket programming, so please bear with me. Generically, I've got a situation where I would like to write a PERL script to check 'network connectivity' between two machines. A bit more specifically, I need to check the network

Re: subs, eval, and BEGIN

2007-03-18 Thread Bill Luebkert
Glenn Linderman wrote: So I'm trying to make a sub to tr iso-8859-1 to unaccented ASCII equivalents. Maybe one already exists, somewhere, but now that I've gotten this far, I'm confused: #!perl Where's your use strict and use warnings ? BEGIN { my ( $tfrom, $tto ); $tfrom =

Re: subs, eval, and BEGIN

2007-03-18 Thread Bill Luebkert
Glenn Linderman wrote: Well, nice you got rid of the BEGIN block... and it compiles and produces the right output twice oops. I sure can't see where it does that! One print statement, in a sub that is called once! Show your new code. The ; can alternately go after END_OF_SUB on

Re: how to round a floating-point value to an integer value

2007-03-16 Thread Bill Luebkert
Su, Yu (Eugene) wrote: Interesting. Any explanation why sprintf treats 3.5 and 4.5 differently in rounding? Try adding this to the loop: printf %.20f, $_; ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To

Re: Hitting a line limit while reading a file

2007-03-14 Thread Bill Luebkert
Ken Cornetet wrote: That character would be a ^Z, which is an end-of-file indicator for microsoft. I can already hear people asking Why the need for an EOF character when MS file systems record an exact byte count? Ok, maybe it's just the usual voices in my head that I hear, but for at

localtime failing on DST change

2007-03-13 Thread Bill Luebkert
My 'localtime' function output doesn't reflect DST since the Sunday changeover. System: XP Pro; Perl B811 The earlier DST change time seems to be picked up OK by Windoze clock. There was some mention of the table changes by Microsoft I believe and there is some info at

Re: localtime failing on DST change

2007-03-13 Thread Bill Luebkert
Dial, Joe wrote: Hello $Bill, I love reading your answers to other people's problems. I hope I can help you. Microsoft announced that there is a patch to the MSVCRT.DLL which may be used by the perl executable. I don't know the windows equivalent to ldd to be sure MSVCRT.DLL is used by

Re: Hitting a line limit while reading a file

2007-03-13 Thread Bill Luebkert
Howard Maher wrote: I was simply counting the number of lines in a 2 gig file, printing to STDERR every 10,000 lines to indicate the program was making progress, but the program stopped at 12,960,000 lines read... an hour and a half later it still hadn't budged... What kind of memory

Re: STDIN not available/@ARGV empty

2007-03-09 Thread Bill Luebkert
Jan Dubois wrote: For example: ASSOC .pl=PerlScript FTYPE PerlScript=perl.exe %1 %* would allow you to invoke a Perl script as follows: script.pl 1 2 3 If you want to eliminate the need to type the extensions, then do the following: set

Re: STDIN not available/@ARGV empty

2007-03-08 Thread Bill Luebkert
Nelson R. Pardee wrote: Bill, Thank you! When I use perl pgmname all works as advertised! I can see the command line arguments and STDIN. So that gives me a workaround, although it really is convenient not to have to know the path to the program (and may Path to what program ? If Perl

Re: STDIN not available/@ARGV empty

2007-03-07 Thread Bill Luebkert
Nelson R. Pardee wrote: 1. I want to pipe the output from a program to STDIN such as type somefile|myperlprogram.pl I've done this forever in unix, but in Windows/dos it behaves weirdly. -t STDIN doesn't know that it isn't pointing at the tty (terminal), yet the script doesn't try to read

Re: checking for infinite loops

2007-03-05 Thread Bill Luebkert
Chris Wagner wrote: At 04:01 PM 3/4/2007 -0800, Bill Luebkert wrote: What's the exact message ? I added $^E in code below which may help. Using this format to get the most recent Windows error message is good for clarity's sake. $^E is context sensitive while this form is unambiguous

Re: checking for infinite loops

2007-03-04 Thread Bill Luebkert
Chris Rodriguez wrote: Hi all, Thanks very much to everyone for this list-serve, and especially to Rob and Bill for helping me so much with this. I'm basically using Bill's code (below) and I have it doing what I want. So yay, mission accomplished, basically, but two peculiar glitches

Re: Cookie Trouble, Honed In

2007-02-22 Thread Bill Luebkert
Jerry Kassebaum wrote: The following cgi script is at http://biblescramble.com/ezo7x.cgi. The first time you load this page it will set a cookie on your machine and display the error message in the last line of the script. The next time(s) you load it it will redirect to the html page it

Re: Cookie Trouble

2007-02-21 Thread Bill Luebkert
Jerry Kassebaum wrote: I'll work on that if I need to. But while I'm working, any clue why print Location: http://biblescramble.com/biblescramble7.html\n\n;; would PRINT the location to a new page if a new cookie is set, and GOTO the location if the cookie has already been set??? Show

Re: Cookie Trouble

2007-02-20 Thread Bill Luebkert
Jerry Kassebaum wrote: If you need more details, let me know. If you go to biblescramble.com an play the first game you'll see what I mean. Try twice and the game will work. Delete my cookie from your machine and it will goof up again. 1) Create a new script that has only the code needed

Re: Name of IF style

2007-02-04 Thread Bill Luebkert
Foo JH wrote: Taguchi san, I like the coding style below for one main reason: it's easy to comment out if needed. No easier than any other method - other than it's compressed into fewer lines - which also makes it less easily modified. IMHO good coding style should support the following:

Re: Name of IF style

2007-02-03 Thread Bill Luebkert
田口 浩 wrote: Hello, The code below is in the Camel book, and I like this style. Anyone knows the name of this style or there is no such a name? if(/^abc/) { $abc = 1 } elsif (/^def/) { $def = 1 } elsif (/^xyz/) { $xyz = 1 } else { $nothing = 1

Re: checking for infinite loops

2007-01-28 Thread Bill Luebkert
Chris Rodriguez wrote: If the alarm function now works on Windows, why doesn't this code give me the results I expect? Might it matter than I'm using Windows ME? What about my version of PERL? It's the one from the CD that came with that book. 5.6 I think - I can check if it matters.

Re: problem with write fucntion in Spreadsheet::WriteExcel

2007-01-25 Thread Bill Luebkert
raj esh wrote: Dear Gurus, I want to write some data into the Excel sheet. I have written code can you people guide me where i am going wrong! All code is working fine but data is not getting written in the result.xls Here is the code..

Re: libwin32-0.26 installation problem on linux

2007-01-25 Thread Bill Luebkert
Jeff Griffiths wrote: Hi Sasan, You're getting these errors because libWin32 is not compatible with Linux. It only works on Windows systems. Maybe it will run under a Windoze emulator ? Sasan porbably ought to stick to PPM installs rather than trying to install from CPAN/wherever.

Re: Help with CGI and CGI::Cookie

2006-12-26 Thread $Bill Luebkert
Casteele/ShadowLord wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I don't know perl well enough to figure this out, but there's prolly a super simple answer.. I've got a perl CGI script using CGI.pm: [code] use CGI; my $q, $c; $q = new CGI; $c{'old'} = fetch

Re: Problem with Win32::Perfmon API

2006-12-14 Thread $Bill Luebkert
[EMAIL PROTECTED] wrote: Hi, I had tried doing it but the ppm is giving up !! It gives an error of Cannot connect to the host www.bribes.org Bad host name It worked ok for me. http://www.bribes.org/perl/ppm/ ___ Perl-Win32-Users mailing

Re: Problem with Win32::Perfmon API

2006-12-13 Thread $Bill Luebkert
[EMAIL PROTECTED] wrote: Hi, I had been trying to install win32::Perfmon API . hile installation it is giving warning of some libraries from lib/CORE missing (eg PDH.lib,msr.lib .) . but makes the Makefile on proceeding for making the binaries from it, it gives an error that

Re: Portable version of Perl for Windows

2006-12-09 Thread $Bill Luebkert
Vladimir Zelinski wrote: Dear colleagues. Probably, question I would like to ask is not a new one, but my search on Internet didn't bring any meaningful result. I would like to have a portable version of PERL on my USB drive. I want to be able to run programs on a Windows machine from

Re: Counting Matches In A Line

2006-12-05 Thread $Bill Luebkert
Chris Wagner wrote: At 02:39 PM 12/5/2006 -0500, Joe Discenza wrote: The tr/// operator counts all the occurrences of the translated character(s) in $_ (the default), and then you just increment the @semis array at the index of the number of semicolons found to indicate another line with that

Re: File Upload

2006-12-03 Thread $Bill Luebkert
Jerry Kassebaum wrote: Friends, The cgi below is at http://biblescramble.com/dns/textArea04.cgi. If you type lines in the text box, it spits them back when you hit Submit Query. However, I also want it to spit back a text file. What am I missing? If you want to spit back a text file,

Re: readdir problem

2006-11-29 Thread $Bill Luebkert
Dan Jablonsky wrote: Hi all, I am trying to read only files in a directory; I need to jump over the dot files and any subdirectories. Seems like a simple thing, however with opendir(DIR, $dir) || die can't opendir $dir: $!; foreach my $file (readdir DIR) { next if (/^\./); # skip

Re: readdir problem

2006-11-29 Thread $Bill Luebkert
$Bill Luebkert wrote: Dan Jablonsky wrote: Hi all, I am trying to read only files in a directory; I need to jump over the dot files and any subdirectories. Seems like a simple thing, however with opendir(DIR, $dir) || die can't opendir $dir: $!; foreach my $file (readdir DIR) { next

Re: Scripts just stopped working..

2006-11-28 Thread $Bill Luebkert
Mark Funk wrote: Folks, I wrote some Perl scripts that connects to an HTTP server and determines the availability of a web page.. This has been working fine for about six months. All of the sudden the script stopped working and I made NO change. Script snippet: ... @step1 =

Re: Win32 and alarm

2006-11-28 Thread $Bill Luebkert
[EMAIL PROTECTED] wrote: Hello, I hear that Win32 cann't use alarm for a timeout. The sample code in Camel book or Cookbook is not valid on Win32. Is this true even now? I must execute some external command by @rc = `SOME.exe`, which may hung sometimes. These are SQLPLUS and FTP and any

Re: Win32 and alarm

2006-11-28 Thread $Bill Luebkert
[EMAIL PROTECTED] wrote: `` is blocking, so maybe use Win32::Process and time it with Time::HiRes. You may need to redirect the output to a file. sounds a heavy task. Any possibility to wait for ActiveState implementing it? They sorta have, but since the OS doesn't support it, it's a

Re: Win32 and alarm

2006-11-28 Thread $Bill Luebkert
Sisyphus wrote: I don't think ActiveState *can* implement wait() to handle processes launched with backticks. But they already provide you with the Win32::Process module, which is the correct course of action ot take. If I understand you correctly, you can just use Win32::Process's Wait()

Re: Extremely fast concat required

2006-11-11 Thread $Bill Luebkert
[EMAIL PROTECTED] wrote: hello all I need a fast concat solution. the following works, but it is extremely slow and it stutters. I am not replicating values, each value that is concatonated is unique- the following is example does not illustrate this. about the stuttering...is this a

Re: help with sockets

2006-11-07 Thread $Bill Luebkert
Alejandro Santillan wrote: Alejandro Santillan wrote: Bill, I was using your solution successfully to read several messages sent by the server, but when trying to work some request, which had a longer answer, your buffer only gets: ... How could I modify your routine, which is the

Re: help with sockets

2006-11-07 Thread $Bill Luebkert
Alejandro Santillan wrote: The $i reaches the number 57, before hanging. It seems that well before reaching the !END! string it reads some char undef or something. You need to check $bytes for error and EOF before reading again. whereas: my $buffer; my $bytes = sysread ($handle, $buffer,

Re: Newbie: email from perl script

2006-11-03 Thread $Bill Luebkert
khozaima shakir wrote: Hi All, I am a newbie to perl. Have installed active state and installed libnet module. Am trying to learn how to send email from perl script and get follwing error : Can't call method mail on an undefined value at myfirst.pl line 152, STDIN line 1. Which line

Re: Expanding environment variables

2006-11-03 Thread $Bill Luebkert
Wong, Danny H. wrote: Hi Perl GURU's, In my Perl script, I read a text file and parse each line delimited by the first = character and create environment variables for each line of data. My question is: is there a way to expand the environment variable when trying to assign an

Re: Expanding environment variables

2006-11-03 Thread $Bill Luebkert
Wong, Danny H. wrote: Hi Perl GURU's, In my Perl script, I read a text file and parse each line delimited by the first = character and create environment variables for each line of data. My question is: is there a way to expand the environment variable when trying to assign an

Re: help with sockets

2006-11-01 Thread $Bill Luebkert
Alejandro Santillan wrote: Bill, I was using your solution successfully to read several messages sent by the server, but when trying to work some request, which had a longer answer, your buffer only gets: ... How could I modify your routine, which is the following: my $buffer; my $bytes =

Re: sharing access to a socket

2006-10-27 Thread $Bill Luebkert
Daniel McBrearty wrote: Now I want to run a thread inside this app that sends back info regularly. It needs to run in a seperate thread, and be startable and stoppable, which I have working. I don't care if the responses from the main thread and the reporter thread lines are mixed up ... ie

Re: sharing access to a socket

2006-10-27 Thread $Bill Luebkert
Daniel McBrearty wrote: thanks Bill. but why is it so inadvisable? I don't get it. I'd have thought that some app where you want one task to execute periodically while another responds to user input was exactly where you should use threads. (I'll look into your suggestions though.) I agree

Re: time manipulation

2006-10-27 Thread $Bill Luebkert
Alejandro Santillan wrote: I would like to know if there exists some module that is able con add and substract times. For example, I want to see the time in seconds between the beginning and ending of an application. Something like this: $a=13:12:01; $b=13:02:01; $c=$a-$b; I

Re: help with sockets

2006-10-26 Thread $Bill Luebkert
Alejandro Santillan wrote: The output was: 8=FIX.4.0.C35=A52=10/26/2006 8:16:10 AM100=PFG10=999 What is simply correct, but if I put 58 instead of 57, the program hangs indefinitely. Obviously I don't know the lengh fo the message beforehand. Anyone has any idea why this happens and how

Re: Time::HiRes inaccurate on win?

2006-10-26 Thread $Bill Luebkert
Daniel McBrearty wrote: I wrote a script today that started a thread that was polling every 1000ms. I used use Time::HiRes qw( usleep ); usleep(1000 * 1000); I didn't get the stopwatch out, but it looked as if the timing was way off. As I need to scale to much shorter timings, I need to

Re: Evaluating inside a here document

2006-10-22 Thread $Bill Luebkert
Suresh Govindachar wrote: But what does use a simple vrbl mean? You mean a verbal description? vrbl = variable Thanks for @{[]} -- it is better than evaluating outside the here doc. This is because the expressions I need to evaluate are fairly complex and the variables

Re: Evaluating inside a here document

2006-10-22 Thread $Bill Luebkert
Suresh Govindachar wrote: $Bill Luebkert wrote: Suresh Govindachar wrote: Thanks for @{[]} -- it is better than evaluating outside the here doc. This is because the expressions I need to evaluate are fairly complex and the variables involved come from hashes

Re: Evaluating inside a here document

2006-10-21 Thread $Bill Luebkert
Suresh Govindachar wrote: Hello, |use warnings; |use strict; | |# Question: In the following, any suggestions for ensuring |#that $stuff will be Twice 3 is 6? |# |#For example, if the here-document were re-written |#to be

Re: what?!? [OT]

2006-10-19 Thread $Bill Luebkert
Sisyphus wrote: - Original Message - From: $Bill Luebkert [EMAIL PROTECTED] Every minute of your life will be permanently recorded for prosperity on 100 ZB (zetta-byte) or 10 YB (yotta-byte) memory cells implanted under your skin and only the size of a pumpkin seed. I can stop

Re: what?!? [OT]

2006-10-19 Thread $Bill Luebkert
George Gallen wrote: Wasn't this already done.with Robin Williams (he was a cutter), where they would put all the good things about your life in a video on your grave. Forget the name of the movie. The Final Cut. Ah yes, very similar idea, but we don't cut the bad stuff.

Re: what?!? [OT]

2006-10-19 Thread $Bill Luebkert
[EMAIL PROTECTED] wrote: My favorite quote anent this somewhat off-topic topic is from a 1949 Popular Mechanics magazine: Computers in the future may weigh no more than 1.5 tons. I worked on some of those. Hee, hee, giggle, chortle, chuckle From the one-time owner of a TI-99,

Re: Parallel Port module

2006-10-18 Thread $Bill Luebkert
Sisyphus wrote: From: Spencer Chase [EMAIL PROTECTED] Greetings perl-win32-users, I am hoping to use the parallelport drv module by Scott Penrose which is available from CPAN. I want to use it on windows and it seems to require a separate win32 module. Which module ? There's nothing

Re: what?!? [OT]

2006-10-18 Thread $Bill Luebkert
Sisyphus wrote: In 2038 I'll be 86. I don't take it for granted that I'll be seeing anything at all :-) I'll save you a spot in my old folks home. :) Not to mention in addition to the 32-bit computers all being in a dump somewhere, so will the 64-biters and the 128-biters. They'll probably

Re: what?!?

2006-10-17 Thread $Bill Luebkert
John Deighan wrote: The problem comes when you have a function that computes an index, it's buggy and returns a negative number. The point is to debug your code properly. You can't expect buggy code to work properly anywhere. This is just one spot where a bug in your code could cause you

Re: what?!?

2006-10-17 Thread $Bill Luebkert
John Deighan wrote: Trust me - all code has bugs in it. That's not true. If you slap a million lines together, then you have a better chance, but a good programmer in a proper environment doesn't write buggy code (or at least removes the bugs before going into production). You'd never get a

Re: Generate RFC-2821 compliant date ???

2006-10-12 Thread $Bill Luebkert
Michael D Schleif wrote: Consider this code: use POSIX qw(strftime); print strftime(%a, %d %b %Y %H:%M:%S %z, localtime 1160662136), \n; On *NIX, that code produces this output: Thu, 12 Oct 2006 09:08:56 -0500 On Windows, using ActivePerl, I get this output on several

Re: Problem loading Archive::Tar

2006-10-10 Thread $Bill Luebkert
Sisyphus wrote: I get the feeling that if I can get Config_heavy.pl's launcher() subroutine to load, then my problem will go away. But I haven't yet worked out what could possibly be preventing it from being run. Give it up and re-install. :) ___

Re: Win32::FileOp Question, and Odd Error behavior

2006-10-04 Thread $Bill Luebkert
Dennis Daupert wrote: Ah, OK, thanks for that info. So 1 or 0 does not mean 'success' or 'failure,' but rather number of copies. You should never get a 0 - just 0 or undef. No need to CC me - I get 3 copies. I CC you so you get an immediate reply (as the poster) esp. when AS is slow during

Re: CPAN Module TK install-error

2006-10-02 Thread $Bill Luebkert
Raphael Brunner wrote: Dear Users I want to write a TK-Application on WinXP. The installed Perl Version is 5.8.8.819. Now the problem: if I insert in cmd.exe the following command: perl -MCPAN -e shell and then in the perl-shell: install Bundle::CPAN Is there a reason for not

Re: media player

2006-09-18 Thread $Bill Luebkert
Spencer Chase wrote: Greetings perl-win32-users, I have started fiddling with the Media Player module that has recently become available on the CPAN site. I have no problem using it in scripts to play MIDI files to the microsoft synth but my goal is to play MIDI to external devices such as

Re: Trapping Carp::croak

2006-09-14 Thread $Bill Luebkert
Bullock, Howard A. wrote: I have stripped my PerlSvc program to a minimal MIME::Lite email program. Using a firewall I blocked access to the mailhost and tested the eval code as both of you suggested and then using an if block to check [EMAIL PROTECTED] The croak was indeed trapped using

Re: Trapping Carp::croak

2006-09-14 Thread $Bill Luebkert
Bullock, Howard A. wrote: Can't locate object method last_send_successful via package MIME::Lite at ReplWatcherCroakTest.pl line 169. I see that I have version 3.01 from the ActiveState repository and that the version on CPAN is now 3.01_05. I do not plan on upgrading until a newer version

Re: Trapping Carp::croak

2006-09-14 Thread $Bill Luebkert
Bullock, Howard A. wrote: No, I did not try that. That method (last_send_successful) is not shown in my local MIME::Lite docs, but I did find it mentioned on CPAN. The CPAN docs state: After sending, the method last_send_successful() can be used to determine if the send was successful or

Re: Trapping Carp::croak

2006-09-13 Thread $Bill Luebkert
Sisyphus wrote: For me that prints: foo didn't fail on '-1' foo didn't fail on '1' foo failed on '0': foo failed on 'undef': foo failed on 'die': I Died at try.pl line 10. Me too. That's exactly what I expected it to produce ... so I guess we must be in agreement :-) Good - it

Re: Trapping Carp::croak

2006-09-12 Thread $Bill Luebkert
Sisyphus wrote: Yes, I think you used eval() improperly. You probably wanted: eval {$msg-send}; if (!$@) { print message sent\n; } else { print Failed to send: [EMAIL PROTECTED]; } While I would agree that your (and my) method work properly, I believe there's nothing

  1   2   3   4   5   6   7   8   9   10   >