I'd forgotten about Strawberry Perl (came across it about a year ago, but never
got around to trying
it). One question, though: I'm thinking there's not much point to using a
64-bit version of mod_perl
unless I'm using it with a 64-bit version of Apache. Where can I get a 64-bit
version of
On 1/26/2011 11:22 AM, Brian Raven wrote:
-Original Message-
From: perl-win32-users-boun...@listserv.activestate.com
[mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of
John Deighan
Sent: 26 January 2011 15:18
To: perl-win32-users@listserv.ActiveState.com; us
I have installed ActivePerl 5.10.1. When I try to install SOAP::Lite using ppm
(I start up ppm-shell and enter
install SOAP-Lite, it fails with the message:
install failed: Can't find any package that provides Apache:: for
SOAP-Lite
I have no idea what the part about Apache:: means -
This past weekend, we updated software on a production server, and in
the process unintentionally updated the DBD-ODBC library from version
1.15 to version 1.17. That change caused our site to fail and we had to
roll back to version 1.15. Here are 2 specific problems we found - both
may have
We needed to have hashes where values could be found in the hash, even
if a key was used that had a different case than the original key used
to put the value into the hash. So, I investigated tied hashes in Perl,
and soon developed a library to do just that, which seemed to work fine,
until
I'm trying to create a global variable in my main script, then when I
load a Perl module, in it, I want to create an alias to that global in
the loaded Perl module. But, when I call a function in that module, the
variable is empty (though I know that the global in my script isn't
empty). I
Several Perl libraries have gone missing from ActiveState's 5.8 PPM
repository, and our software depends on them. Does anyone know why
these libraries are no longer available there? They were there just 2
weeks ago. The libraies are:
Date-Calc
String-Trigram
Devel-Size
DBD-ODBC
Also, DBI, but
FYI, in my experience with Windows, No such file
or directory, or Permission denied don't necessarily mean what they say.
At 08:57 AM 5/10/2007, Dennis Daupert wrote:
Hello list,
The copy command is failing, error says:
Copy failed: No such file or directory at D:\Perl\get_files\get_files.pl
I think the safest way to round is to add 0.5, then use the
POSIX::floor function. The Perl docs warn against using int() for
just about anything (I don't have the exact quote handy):
use strict;
use POSIX qw(floor);
MAIN: {
foreach my $x (
0.0, 0.1, 0.2, 0.3, 0.4, 0.5,
This probably doesn't answer your question, but we use Crypt::SSLeay,
which we get from the winnipeg reporitory at
http://theoryx5.uwinnipeg.ca/cgi-bin/ppmserver?urn:/PPMServer58.
Installed via ppm, of course. It downloads 2 DLL files, which need to
be put somewhere in the system path. That
At 10:18 AM 11/29/2006, 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
At 05:54 PM 10/16/2006, Barry Brevik wrote:
Now, there's a great feature. If you index before the beginning of an
array, it neither gives you a runtime error nor returns undef. What a
If you are expecting the array index to begin at 0, then do some
bounds checking on your complicated function
At 09:37 AM 10/17/2006, George Gallen wrote:
Referencing the last element of an array (-1) without having to get
the # of elements first, is VERY useful. Using other negative positions
might not have as many uses, but when you find one, You'll be glad
it's there.
The problem comes when you have a
At 11:35 AM 10/17/2006, $Bill Luebkert wrote:
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
At 01:52 PM 10/17/2006, $Bill Luebkert wrote:
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
my @data = (1, 2, 3);
my $index = -1;
my $val = $data[$index];
print(val = '$val'\n);
Output:
val = '3'
Now, there's a great feature. If you index before the beginning of an
array, it neither gives you a runtime error nor returns undef. What a
great way to end up with a program that produces
We normally install Perl and all the libraries we need by using ppm
over the Internet. However, we now have a need for an installation
mechanism that doesn't require access to the Internet. I'm pretty
sure that (if I knew what I was doing), I could download the files
that ppm normally accesses
At 12:05 AM 7/24/2006, Chris Wagner wrote:
It's better to not use strict or
use no strict vars. undef is a perfectly
legitimate variable value.
Bad advice - you should always use strict.
More importantly, the problem is not use strict, but
use warnings. In this case, I assume that it's being
At 09:47 AM 5/12/2006, Yekhande, Seema \(MLITS\) wrote:
Holger,
Actually $ is a special character in string in perl. So, if the $ is
there in the input,
you will have to always write it with the leading escape character.
So, make your input will be like this,
my $data = Hello, i am a litte
At 11:07 AM 5/3/2006, David Kaufman wrote:
Hi Chris,
Chris Wagner [EMAIL PROTECTED] wrote:
At 01:28 AM 5/3/2006 -0400, David Kaufman wrote:
my ($b, $c) = ($1, $2) if $a =~ /^(\D+)(\d+)/;
U can't combine a my and an if. Perl will go schizo.
Sure U can :-) I use this type of construct all
Twice now, I've installed the latest ActivePerl (from
perl-win32-users@listserv.ActiveState.com), and both times, after the
installation my Perl/bin folder does not contain PerlIsEx.dll (that's
a lowercase 'L' followed by an uppercase 'i' as the 4th and 5th
letters). Any ideas?
I'm running
At 12:44 AM 4/20/2006, Chris Wagner wrote:
At 10:42 AM 4/20/2006 +1000, Sisyphus wrote:
On the subject of replacing brackets with modifiers (which I think was also
raised earlier on), I was surprised to find that using a modifier is about
25% faster than brackets:
'modifier' = 'for(@x) {$z1++ if
At 04:50 PM 2/17/2006, Robert May wrote:
my is a compile time directive that creates the lexically scoped $i,
giving is scope from its definition until the end of the enclosing block.
Assignment is a run time operation. In your example the modified
assignment doesn't get executed, so the
OK, same caveat as before - apparent bugs in Perl are usually user
errors, but once again, I'm stumped. Here is my code. The problem I
have is in the second call to getCached(), specifically, the line:
my($nextID,$maxID) = @$L if $L;
The parameter to getCached, $Customer, has a different
At 01:29 PM 2/17/2006, Chris Wagner wrote:
At 12:46 PM 2/17/2006 -0500, John Deighan wrote:
OK, same caveat as before - apparent bugs in Perl are usually user
errors, but once again, I'm stumped. Here is my code. The problem I
have is in the second call to getCached(), specifically, the line
At 01:06 PM 2/17/2006, Joe Discenza wrote:
Fascinating! You
have one misconception right off: The my line is never
executed (not even to make the new variables) if $L is
false.
OK, then, consider this program. Notice that there's a global $i
which has the value 5. Now, when func() is called, if
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
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
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
Using the DBI with Microsoft SQL Server, I'm trying to get data back
from a stored procedure call and getting an Invalid Cursor State
error at the execute() call below (it never gets to the
fetchrow_array call). Has anyone else run into this? Can anyone help?
my $sth = $dbh-prepare(exec
At 10:46 AM 1/24/2006, Ray Albert wrote:
Hello, I just successfully ran your code against my database. Is it
possible you lost the database connection?
I don't think so. It's very repeatable. However, I think this code
used to work, so I got to thinking about the versions of Perl, SQL
At 10:19 AM 1/12/2006,
=?koi8-r?Q?=E1=D2=D4=C5=CD=20=E1=D7=C5=D4=C9=D3=D1=CE?= wrote:
If you want tab instead of space after each country code, try this:
while (FILEFROM) {
if (/\d\s[A-Z]{3}\s/) {
s/(\d\s[A-Z]{3})\s/$1\t/g;
}
print FILETO $_;
}
I don't see the point of the if
The following script dies, with the error message DBD::ODBC::st
execute failed: [Microsoft][ODBC SQL Server Driver]Invalid character
value for cast specification (SQL-22018)(DBD: st_execute/SQLExecute err=-1).
Can anyone tell me why? The database handle is a good database
handle. The fields
Is there a simple way to get the amount of memory being used by a
Perl data structure? I know that there may be problems with multiple
data structures sharing a common list or hash, but what I'd really
like is to do something like:
my $nBytes = bytesused($href);
and get the total memory used
My ppm has both the ActiveState repository and the Winnipeg
repository installed. Previously, I could install the Crypt-PasswdMD5
library via ppm (I don't know for sure at which repository it was
found), but now, on another computer, it cannot be found. On my
computer, where it is currently
Is there a safe way to compare 2 floating point numbers in Perl? I
have 2 numbers, one of which was created by accumulating a series of
other numbers into it - the other was entered directly. My debugger
says that they're both '630.24', and when I print them, they both
print as '630.24'.
At 02:20 PM 7/24/2005, Ed Chester wrote:
John Deighan::
Is there a safe way to compare 2 floating point numbers in Perl? [snip]
My debugger says that they're both '630.24' [snip]
However, the == test fails and the != test succeeds
can you post code with the comparison == that fails
At 09:55 AM 7/14/2005, Lloyd Sartor wrote:
My opinion is that the goto statement can be useful in error handling
situations, particularly when parsing data. This removes the
rarely-executed error handling code from the expected, normal processing
code. This makes the normal code more cohesive,
At 08:30 AM 7/13/2005, Hugh Loebner wrote:
Why on earth are you using a
goto statement? They are pernicious.
We have a goto in our code. I hate it, but there just isn't a good
switch or case statement in Perl yet (I think
I've heard that it's planned), and the following just isn't efficient
At 10:46 AM 7/13/2005, Thomas, Mark - BLS CTR wrote:
John Deighan wrote:
We have a goto in our code. I hate it, but there just isn't a good
switch or case statement in Perl yet
Yes there is, in Perl 5.8. If you're using an older Perl, you can still get
Switch.pm from CPAN.
Great to know
Can someone tell me what's going on in my script? Here it is:
use strict;
use POSIX qw(INT_MAX);
my $i = INT_MAX;
my $n = INT_MAX - 1000;
print(i = $i\n);
print(n = $n\n);
It prints out:
i = 2147483647
n = 2147483647
i.e. $i and $n are identical. If I change the second line to:
my $n = $i
At 02:55 PM 6/29/2005, Joe Discenza wrote:
Peter
Eisengrein wrote, on Wed 6/29/2005 13:04
: Can someone tell me what's going on in my script? Here it is:
:
: use strict;
: use POSIX qw(INT_MAX);
:
: my $i = INT_MAX;
: my $n = INT_MAX - 1000;
: print(i = $i\n);
: print(n = $n\n);
:
-Original Message-
From: [EMAIL PROTECTED]
[SMTP:[EMAIL PROTECTED] On Behalf Of John
Deighan
Sent: Tuesday, April 19, 2005 4:57 PM
To: perl-win32-users@listserv.ActiveState.com
Subject: die() without setting $@
*** WARNING : This message originates from the Internet ***
I need
At 12:46 PM 4/20/2005, Rhesa Rozendaal wrote:
John Deighan wrote:
The problem with trying to use goto, or a return, or setting a global
variable is that they don't work well in a function that's being called
by the code that contains the eval. 'return' won't work because it will
simply return
I need to be able to jump to the end of the enclosing eval block, just like
a die() does, but without setting [EMAIL PROTECTED] Is there a way to do that? (I've
checked the Perl docs, but couldn't find it). I could possibly die() with a
specific string, then use if ($@ ($@ ne string)) as the
At 05:35 PM 4/7/2005, Chris Wagner wrote:
I *always* call my own defined functions/subroutines with the prefix.
It's just good practice. Allowing the to be omitted just encourages bad
programming practices. And I'm sorry that ur bad practice has finally
caught up with u but pouting isn't going
Here's something I found on the 'perldiag' man page:
Ambiguous call resolved as CORE::%s(), qualify as
such or use
(W ambiguous) A subroutine you have declared has the same name as a
Perl keyword, and you have used the name without qualification for
calling one or the other. Perl decided to
At 02:40 PM 4/8/2005, Charles K. Clarkson wrote:
John Deighan wrote:
[snip]
: However, I can't get this warning to appear. Is it that
: 'reset' isn't a 'keyword'?
[snip]
No. You just gave up too quickly.
#!/usr/bin/perl
use strict;
use warnings;
use diagnostics;
sub reset;
print reset();
sub
I wrote a script, and in it, I defined a function named reset. However,
when I call that function, nothing happens. What's going on here? I realize
that this may be the name of a built-in function or something, but surely
that can't override a function defined in the same file where the
At 10:07 AM 4/7/2005, $Bill Luebkert wrote:
John Deighan wrote:
I wrote a script, and in it, I defined a function named reset. However,
when I call that function, nothing happens. What's going on here? I
realize
that this may be the name of a built-in function or something, but surely
At 12:17 PM 4/7/2005, $Bill Luebkert wrote:
John Deighan wrote:
That's all very useful information, but there's no mention of what takes
precedence - this reset statement or a user function named reset. Why
would an obscure feature like this reset statement take precedence over a
user-written
I would like to use DBI handles as hash keys. I thought that I'd read
somewhere quite a while ago that Perl was adding the capability to use
non-scalar values as a hash key. However, when I try $h-{$db} = $string,
where $db is a DBI handle, the DBI handle is converted to a string. If
that's
At 09:46 PM 2/27/2005, Michelle Davis wrote:
Hi All,
We have an ActivePerl setup on WinXP Pro with IIS 5. We have mapped
perlis.dll to .pl and everything pretty much works fine. One little
problem, if anything is wrong with a script and it generates an error - it
writes the error fine to
At 08:26 PM 1/28/2005, $Bill Luebkert wrote:
John Deighan wrote:
We are receiving the following error message, and have no idea what is
going wrong. Our script uses the Storable module, but the error occurs
only
when our script attempts to use the freeze() function in that module. I
assume
We are receiving the following error message, and have no idea what is
going wrong. Our script uses the Storable module, but the error occurs only
when our script attempts to use the freeze() function in that module. I
assume that the problem occurs when the AutoLoader tries to load that
In the following code (where I create the statement handle myself, because
I want the option of using prepare_cached()), is the call to finish()
correct, redundant, bad, safe? I definitely only want the results from a
single row, even in cases where $sql may contain a statement that would
At 12:02 PM 1/14/2005, Chris wrote:
$dbh-disconnect;
See: http://search.cpan.org/~timb/DBI-1.46/DBI.pm
Unfortunately, I don't want to disconnect from the database. I just want to
make sure that no further resources are tied up by the statement handle.
-Original Message-
In the following
can't figure out what permission I need to give to the IUSR_JDEIGHAN
account so that the CGI script will run under that account.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of John Deighan
Sent: Wednesday, December 15, 2004 12:59 PM
To: [EMAIL
I'm trying to get my web site working with an Oracle database (I've been
using SQL Server through DBD::ODBC). Although stand alone scripts can
successfully access the remote Oracle database, my web site, running under
IIS, can't. I get a 500 server error, and in the Perl log file, I get:
***
The following code, I think, should die() on the call to execute(), since
the query clearly has one placeholder, but no value is provided for it. Or
am I missing something? (BTW, I'm using ActivePerl 5.8.3 Build 809, DBI
1.42, and DBD::ODBC 1.10.)
use strict;
use DBI;
use DbConn;
my $db =
At 03:58 PM 11/4/2004, Peter Guzis wrote:
When you DBI-connect within DbConn, are you setting the RaiseError
attribute to 1?
Yes, sorry I didn't mention that, but I always set RaiseError to 1.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
John Deighan
Sent
The following simple script gives me the error message Can't rebind
placeholder 3 at C:\Scripts\temp.pl line 14. (i.e. at the execute() call)
and I can't figure out why. I'm using the DBD-ODBC driver and a SQL Server
database. The SqlStmtTestUtils.pm library just provides the getConn()
Seeing as noone else has responded to this, let me simply say that I tried
to develop an application using Perl threads, and in my opinion, Perl
threads are seriously broken. We had to re-write the application without
threads.
The main problem was that threads would die, but I found no
version 1.49
installed?
John Deighan
Public Consulting Group
1700 Kraft Dr.
Suite 2250
Blacksburg, VA 24060
[EMAIL PROTECTED]
540-953-2330 x12
FAX: 540-953-2335
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http
Topics: (not commands)
ppm_migration - guide for those familiar with
PPM
prompt - how
to interpret the PPM prompt
quickstart - a crash course in using
PPM
unicode - notes
about unicode author names
ppm help repository
ppm help install
ppm help upgrade
ppm quit
C:\Scripts
John Deighan
Public
;
};
};
__DATA__
Something else
coyote
Wile E. Coyote
John Deighan
Public Consulting Group
1700 Kraft Dr.
Suite 2250
Blacksburg, VA 24060
[EMAIL PROTECTED]
540-953-2330 x12
FAX: 540-953-2335
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED
:\n);
for my $name (@$lNames) {
print( $name\n);
}
my $lData = $sth-fetchall_arrayref(); # fetch all of the data
my $n = @$lData;
print($n records retrieved\n);
= OUTPUT:
Field Names:
ID
FullName
550 records retrieved
John Deighan
Public Consulting Group
1700 Kraft Dr
read the same file - I get a no such file type of error message in the $!
variable. Why would this happen?
John Deighan
Public Consulting Group
1700 Kraft Dr.
Suite 2250
Blacksburg, VA 24060
[EMAIL PROTECTED]
540-953-2330 x12
FAX: 540-953-2335
___
Perl
=~ /^--?([a-z]+)$/)
(length($1)==6)
check($1, qw(m e v q g n))) {
print(OK
'$str'\n);
}
else {
print(no
'$str'\n);
}
} # test
# --
sub check { my($str, @chars) = @_;
foreach my $ch (@chars) {
return
undef if (index($str, $ch)==-1);
}
return 1;
} # check
John
Perl module is thread-safe or not? Also, advice on how to ensure
that Perl modules I develop are thread-safe.
Thanks.
John Deighan
Public Consulting Group
1700 Kraft Dr.
Suite 2250
Blacksburg, VA 24060
[EMAIL PROTECTED]
540-953-2330 x12
FAX: 540-953-2335
I have a service, that I've created with PerlSvc. Occasionally, it doesn't
start up correctly after a reboot, and I suspect that it's because it
accesses a database, and the database server may not have started
completely when my service is started. Under Windows, one service can be
dependent
I have a DBI database handle, created with RaiseError set to 1, which is
working just fine. If I execute a DBI call within an eval block, the error
is caught. However, I thought that the following would guarantee that any
errors would be ignored, since I don't call die() in the 'if' block, but
I have a function, of which I want only a single instance executing at any
point in time. It calls a stored procedure in MS SQL Server, to get the
next available ID number for inserting data into a table. (it reads a value
from a table of next available ID numbers, increments the number in the
At 10:11 AM 9/30/2002 -0400, Tillman, James wrote:
As you can see, I've gotten a bit paranoid, and
tried using a
Win32::Mutex object inside the function, although I thought
that using
locked would prevent multiple instances from running at any
point in
time. The problem is that it
At 05:32 PM 6/25/2002 +, steve silvers wrote:
To get the current date im using.
my ($mday, $mon, $year) = (localtime(time))[3..5];
my $startdate = sprintf %02u/%02u/%u, $mon + 1, $mday, $year + 1900;
Which gives me 06/25/2002
I have this written to my database in the startdate field. When
While on the subject of mod_perl binaries, does anyone know where to find
pre-compiled binaries for mod_perl for Linux? I'm looking for a mod_perl.so
file (i.e. dynamically linked mod_perl) for Apache 2.
___
Perl-Win32-Users mailing list
[EMAIL
can catch everything up to the first '.' in a ()
$tarFile =~ s/^(\w+)\./$1/;
The problem is that s/x/y/ just replaces x (not the whole string) with y.
How about using:
$tarFile =~ s/\.tar$//;
John Deighan
Public Consulting Group
2000 Kraft Dr
ion failed in require at C:\Inetpub\wwwroot\easyiep.plx line 36.
BEGIN failed--compilation aborted at C:\Inetpub\wwwroot\easyiep.plx line 36.
----
John Deighan
Public Consulting Group
2000 Kraft Dr.
Suite 1106
(540
78 matches
Mail list logo