Re: Quick Q

2006-04-13 Thread $Bill Luebkert
David Dick wrote: > you're saying the bug was that i didn't print out the mtime? No, I was referring to the stat, but my mistake - I forgot you did the catfile. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe

Re: Quick Q

2006-04-13 Thread David Dick
$Bill Luebkert wrote: David Dick wrote: how about; use DirHandle(); use File::Spec(); use strict; use warnings; my ($directory) = "C:\\some\\directory"; my ($handle) = new DirHandle($directory); unless ($handle) { die("Failed to open '$directory':$^E"); } my ($entry, $path); my ($de

Re: Tk

2006-04-13 Thread $Bill Luebkert
Jerry Kassebaum wrote: > Friends, > > I am attempting to enter some text in a Tk text area and send it to my > (Windows ME) DOS window. > > Below are two programs, the first with the text area, which doesn't work, > and the second with a single-line text entry, which does work. > > # > us

Re: Quick Q

2006-04-13 Thread $Bill Luebkert
David Dick wrote: > how about; > > use DirHandle(); > use File::Spec(); > use strict; > use warnings; > > my ($directory) = "C:\\some\\directory"; > my ($handle) = new DirHandle($directory); > unless ($handle) { > die("Failed to open '$directory':$^E"); > } > my ($entry, $path); > my ($dev

Re: modify @INC

2006-04-13 Thread Steve Green
Adam Peterson wrote: > > how can i modify @INC to look in the right location. i've attempted to explicity list where the module is located, but i've had no luck. > use lib LIST Where LIST is a list of the directories you want to search. The pathnames should be unix-style with forward slashes,

Re: Quick Q

2006-04-13 Thread David Dick
how about; use DirHandle(); use File::Spec(); use strict; use warnings; my ($directory) = "C:\\some\\directory"; my ($handle) = new DirHandle($directory); unless ($handle) { die("Failed to open '$directory':$^E"); } my ($entry, $path); my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, $

Re: Quick Q

2006-04-13 Thread Nelson R. Pardee
This doesn't exactly answer your question, but a compact version: chomp(@subDirs=`dir c:\\some\\directory 2>&1`); You can use opendir and readdir, too, although because I often want time stamps, etc., I find myself coming back to the above and so far its performance has been good (I've called it

RE: Perl OO not looks like its mother

2006-04-13 Thread Bharucha, Nikhil
I have written OO Perl Modules for Win32 that I wouldn't even think of trying to do in something like PHP. They have been in Production for almost 2 years and are extremely robust. The OO implementation in Perl 5.x is a very straightforward logical one, and a joy to work with. This may be missed

modify @INC

2006-04-13 Thread Adam Peterson
hello,   how do i change the location that perl is looking for modules at runtime? another application has installed its own instance of perl and my script is looking in the wrong location for the modules. i've confirmed that the version i have is included in the "Path". i see the module at: D:\P

Quick Q

2006-04-13 Thread Ng, Bill
Simple one, Until now, if I wanted to get a listing of the subdirectories of a folder, I've been using the following: --- open (DIR, "dir c:\\some\\directory |"); while () { chomp $_; push (@subDirs, $_); } close DIR; ---

Re: Tk

2006-04-13 Thread Ron Hartikka
use strict;use Tk;my $mw=MainWindow->new;$mw->title("TextArea");my $textBox=$mw->Scrolled("Text")->pack();$mw->Button(-text, "Store it", -background, "yellow", -foreground, "purple", -command, sub{\&enterIt();})->pack();MainLoop;sub enterIt()   {my $enteredThis = $textBox->get("1.0", "end");  

Re: Perl OO not looks like its mother

2006-04-13 Thread Jeff Griffiths
So Phal wrote: HI, Perl OO seems not stamdard as C++/Java. For PHP the OO is very similar to C++/JAva, so why many web programmer prefer PHP then Perl. What do you think? Why should Perl have to be like C++ or Java? Also, I don't think PHP is a fair comparison. Decent OO support in PHP has a

Tk

2006-04-13 Thread Jerry Kassebaum
Friends, I am attempting to enter some text in a Tk text area and send it to my (Windows ME) DOS window. Below are two programs, the first with the text area, which doesn't work, and the second with a single-line text entry, which does work. # use strict; use Tk; my $mw=MainWindow->new;

RE: Replace Leading Spaces (fwd)

2006-04-13 Thread Thomas, Mark - BLS CTR
I realized that my previous post had the wrong comparison. Here's one that's short and to the point: re1 => q($str = ' 259.00 '; $str =~ s/\s(?=\s*\S)/0/g;), re2 => q($str = ' 259.00 '; $str =~ s/ (?= *\d)/0/g;), Benchmark: timing 100 iterations of re1, re2... re1: 3 wal

Win32 Perl Threads SLOW memory leak.

2006-04-13 Thread John Serink
Hi All: The attached script is a performance test model I use for a production script I have that uses sockets to connect to various targets once per minute. It used to leak 2 handles per thread per run but that has been fixed with perl 5.8.8-817. Now that the handles leak is fixed I have been obs

Perl OO not looks like its mother

2006-04-13 Thread So Phal
HI,   Perl OO seems not stamdard as C++/Java. For PHP the OO is very similar to C++/JAva, so why many web programmer prefer PHP then Perl.   What do you think?   ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: