Steve wrote:
I've installed the (very useful) Win32::Fileops package
(http://jenda.krynicky.cz/perl/FileOp.pm.html) and am using the
BrowseForFolder function. The function is working fine except for two
problems.
First I can't get it to start from any directory except the system
root. Ac
If you just want to code and don't care much for installation issues,
have a look at
http://www.apachefriends.org/
-> WAMPP (Apache, Mysql, Perl&Php and some other stuff like PHPmyAdmin for Windows) or LAMPP (Apache, Mysql, Perl&PHP, phpMyAdmin, proFTP, OpenSSL, GD and so on for Linux).
I've alrea
Title: RE: Ping routine correct?
It returns a 1 if reachable, 0 if not, undef if there is the hostname cannot be resolved or there is a problem with the ip address. Not sure why yours is working for you.
Below's my attempt at something similar.
### ping.pl
use Net::Ping;
use Win32::Co
> -Original Message-
> From: Capacio, Paula J [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 06, 2002 3:59 PM
> #why doesn't this work...
>$hash{'A'} = $hash{'A'}++;
> #isn't it logically equivalent to this?
> $hash{'A'} = $hash{'A'}+1;
You can simply use:
$hash{'A'}++;
or:
> -Original Message-
> From: Capacio, Paula J [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 06, 2002 2:59 PM
> I was using a hash to accumulate occurrences of a string
> (jobnames) in the file and I tried to use ++ to auto
> increment; but it didn't work. Since TMTOWTDI, I found a
> -Original Message-
> From: Capacio, Paula J [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 06, 2002 2:59 PM
> To: Perl-Win32-Users (E-mail)
> Subject: AutoIncrement hash value
>
>
> I was using a hash to accumulate occurrences of a string
> (jobnames) in the file and I tried to
I was using a hash to accumulate occurrences of a string (jobnames) in the file and I
tried to use ++ to auto increment; but it didn't work. Since TMTOWTDI, I found an
easy solution but I'm just curious as to why this doesn't work. Shouldn't the value
of key 'A' be 2?; why doesn't ++ work or w
I assume IsObject is a method that returns TRUE if the given object is of
the given class, and FALSE otherwise. If this is the case, the 'canonical'
way to do it is to use UNIVERSAL::isa. See the 'perlobj' documentation for
details. Here's some (working, this time!) sample code:
use strict;
use w
> See ref() -- perldoc -f ref()
While ref is useful, you do have to be careful in this particular situation
to avoid the non-OO references CODE, HASH, ARRAY, and SCALAR. Someone else
already posted a solution, I believe.
This might also work (although it will cause a scan of the entire
inheritan
From: "Brad Currens" <[EMAIL PROTECTED]>
> Does anybody know whether there is some equivalent in Perl to VB's
IsObject function?
>
> Thanks.
See ref() -- perldoc -f ref()
i.e.:
use IO::File;
sub print_type {
my $arg = shift;
print "Argument is: " . ref($arg) . "\n";
}
my $object = IO::Fi
It depends on what you're trying to do, but I think the "ref" function might work. It
returns a true value if the argument is a reference. The value it returns just so
happens to be the type of reference (i.e. ARRAY, CODE, HASH, etc). Also, if the
reference has been "blessed" into a package i
"Does anybody know whether there is some equivalent in Perl to VB's
IsObject function?"
It would be helpful to have a description of the VB IsObject function, but
judging by the name, you could do something like this (untested)
sub isObject {
my %types = map {$_=>$_} qw(SCALAR ARR
Does anybody know whether there is some equivalent in Perl to VB's IsObject function?
Thanks.
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
I have installed
Apache 2 from http://httpd.apache.org/download.cgi (Win32 Binary (MSI Installer)) and perl from http://aspn.activestate.com/ASPN/Downloads/ActivePerl/
My apache lives in
D:\Program Files\Apache Group\Apache2, because I have a second disc
(D:)
The first thing to edit is
t
On Fri, 6 Dec 2002 08:15:46 -0800 (PST), Terry Carroll <[EMAIL PROTECTED]>
wrote:
> $ARTICLE = "/usr/spool/news/comp/lang/perl/misc/38245";
> open ARTICLE or die "Can't find article $ARTICLE: $!\n";
> while () {...
>
>Again, the sample program using this form *does* indeed work -- but not if
>t
> -Original Message-
> From: Beckett Richard-qswi266 [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 06, 2002 10:25 AM
> To: Perl-Win32-Users
> Subject: Loop syntax problem.
>
>
> Hello World!
>
> I have a loop syntax problem. When [1] a Stupid User (TM)
> enters a non numeric valu
Apache 2 has the directive
ScriptInterpreterSource Directive
Description: Technique for locating the interpreter for CGI scripts
Syntax: ScriptInterpreterSource registry|script
Default: ScriptInterpreterSource script
Context: server config, virtual host, directory, .htaccess
Override: FileInf
Richard,
try putting an if statem to test for digits.
if ( $ping_number =~ /^\d+$/ ) {
for ($loop = 1; $loop <= $ping_number; $loop++) {
print "$loop\n";
}
}
else
{
print "$ping_number not numeric";
}
Later,
Matt
-Original Message-
From: Beckett Richard-qswi266 [mai
On Fri, 6 Dec 2002, Terry Carroll wrote:
> 2) Is the requirement on the scope of the variable documented anywhere? I
> did try to find something on this before posting, and couldn't.
Well, I'm a dumb-ass. I checked the FAQ and all through the Camel book,
but never checked the authoritative sour
Hello World!
I have a loop syntax problem. When [1] a Stupid User (TM) enters a non
numeric value for $number, my loop falls over. I'm trying to trap this error
condition, and thought that die would be a nice way to do it, especially as
I'm using Tk::ErrorDialog.
Unfortunately I can'd find the sy
On Fri, 6 Dec 2002, Richard Morse wrote:
> Actually, I believe that Perl does allow this -- it's probably inherited
> from Perl 4. The problem with the code is that, in order for the magic to
> work, the scalar variable needs to be in the symbol table. A 'my' variable
> isn't put into the symbol
I've installed the (very useful) Win32::Fileops
package (http://jenda.krynicky.cz/perl/FileOp.pm.html)
and am using the BrowseForFolder function. The function is working
fine except for two problems.
First I can't get it to start from any directory
except the system root. According to
On Thu, 5 Dec 2002, $Bill Luebkert wrote:
> $REPORT is defined, but it's not a filehandle.
>
> open REPORT, $REPORT or die $!;
> or
> open REPORT, $infile or die $!;
>
> Using $REPORT would be trying to use a symbolic reference ...
Bill, I think we're talking about two different thing
23 matches
Mail list logo