Hi
I am running an installation of Cygwin and the bundled perl5.8 + Win32
on Windows 98.
When I try to use Win32::OLE as in the following script:
#!/usr/bin/perl
use Win32::OLE qw(EVENTS);
my $IE = Win32::OLE-new(InternetExplorer.Application)
|| die Could not start Internet
Here's a test snippet for doing something like this without
the help of a module :
use strict;
use warnings;
my $file = 'training.txt';
my @matrix;
my @matrix2;
open OUT, $file or die create $file: $! ($^E);
for (my $x = 0; $x 26; ++$x) {
for (my $y = 0; $y 26; ++$y) {
I realize that most things that look like bugs in Perl are in reality
programmer bugs, but I can't figure out why the second call to the
function parse() in the code below fails. According to my debugger
(from ActiveState's Perl Development Kit), the function parse() gets
a correct list of 3
you may be interested in pdl, see pdl.perl.org.
it might make your whole matrix life easier.
ed c
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
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 actually trying to
open the
This should illustrate what is going on:
use strict;
my $lTokens = [qw(2 * 2)];
print 1 before parse: , $lTokens, \n;
my $errmsg = parse($lTokens);
print($errmsg ? ERROR: $errmsg\n : OK\n);
$lTokens = [qw(2 * 2)];
print 2 before parse: , $lTokens, \n;
my $errmsg = parse($lTokens);
print($errmsg
Hi Howard, thanks for the response. This ought to be pretty simple, BUT...
I looked at Win32::GetOSVersion() several months ago but it doesn't seem to
differentiate between Win 2000 Svr and Pro. Here is a quick example that
provides the same output for both Svr and Pro. It doesn't appear to pull
[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
On 2/8/06, Dirk Bremer [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.
Can you give an example where -d fails?
--
At 12:10 PM 2/8/2006, Glenn Linderman wrote:
On approximately 2/8/2006 6:40 AM, came the following characters
from the keyboard of John Deighan:
I realize that most things that look like bugs in Perl are in
reality programmer bugs, but I can't figure out why the second call
to the function
Your instinct is correct. Simplest,
most important suggestion: always use warnings; when
developing and testing code.
Ok... I know you asked not to receive
rewritten code -- but your parse / gettoken functions cries out for simplification.
The sole purpose of your two functions is to get the
It turns out that in a very long pathname that I had one-byte that was
incorrect that was causing the file-test -d operator to fail, rightly
so. My mistake!
Dirk Bremer - Senior Systems Engineer - ESS/AMS - NISC Lake St. Louis MO
- USA Central Time Zone
636-755-2652 fax 636-755-2503
[EMAIL
Hello!
I was wondering if anyone knows/has had experience with using sleep() in a
conditional context. For example...
for ($x=0; $x= 10; $x++) {
print $x\n;
# if x is equal to 5, sleep for 5 seconds
if ($x == 5) { sleep(5); }
}
What I wanted to accomplish with this
On Wed, 08 Feb 2006, Todd Morrison wrote:
I was wondering if anyone knows/has had experience with using sleep() in a
conditional context. For example...
for ($x=0; $x= 10; $x++) {
print $x\n;
# if x is equal to 5, sleep for 5 seconds
if ($x == 5) { sleep(5); }
}
Glenn Linderman wrote:
So, $lTokens is a reference from a sub, to a variable declared outside
of the sub (specifically, to the $lTokens declared in parse on its
first invocation), thus making gettoken a closure and causing that
instance of $lTokens to be preserved as part of the state of
At 03:09 PM 2/8/2006, Glenn Linderman wrote:
Now that I understand the situation, I can offer the following as a
way to safely do what I was trying to do in the first place - by
creating an anonymous function and assigning it to a variable named
$gettoken, then calling it with the syntax
Hello Todd,
It's weird, because I tried your piece of code and it work the way you
expect it to work:
Print 0 to 5, wait 5 seconds print 6 to 10.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Todd Morrison
Sent: Wednesday, February 08, 2006 3:29 PM
To:
At 11:13 AM 2/8/2006 -0600, Dirk Bremer 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
What's wrong with -d? It works for me.
At 09:10 AM 2/8/2006 -0800, Glenn Linderman wrote:
So, $lTokens is a reference from a sub, to a variable declared outside
of the sub (specifically, to the $lTokens declared in parse on its first
invocation), thus making gettoken a closure and causing that
instance of $lTokens to be
Glenn Linderman wrote:
On approximately 2/8/2006 1:06 PM, came the following characters from
the keyboard of Lyle Kopnicky:
Thanks for the explanation. As far as I am concerned, then, perl's
closure model is unintuitive and broken. It doesn't work like
closures in any other language I have
When I try to use Win32::OLE as in the following script:
#!/usr/bin/perl
use Win32::OLE qw(EVENTS);
my $IE = Win32::OLE-new(InternetExplorer.Application)
|| die Could not start Internet Explorer.Application\n;
I get the following error:
Can't load
Mario Sanchez wrote:
hello everyone,
can you please point me to a package or script that will first determine
the columns of a database table, then output well formed XML? condition: i
do not know in advance the columns of the table.
example output where field = actual field name
table
Dirk Bremer 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.
What's wrong with -d? It' is not a file test. It's a test if the path
At 06:53 PM 2/8/2006 -0800, Glenn Linderman wrote:
My understanding is that in a file foo.pl
my global_foo;
sub counter { return global_foo++; }
that sub counter is a closure, which probably is even further outside
your thought processes-- I was surprised to learn that from Dave, but
given
Foo Ji-Haw wrote:
Dirk Bremer 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.
What's wrong with -d? It' is not a file test. It's a
Rod Butcher wrote:
Foo Ji-Haw wrote:
Dirk Bremer 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.
What's wrong with -d? It' is not a
26 matches
Mail list logo