If you are running Perl on a Win32 server, you can try Win32::Perfmon, too.
-Original Message-
From: Andre' Solomon
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: 1/23/02 8:34 PM
Subject: Re: Perl Module for Server Statistics
Thanks. I will give it a go
- Andre'
- Original Mes
Try Mail::POP3Client module, available from the PPM Repository of
Activestate.
- Rex
- Original Message -
From: "Chris Zampese" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 23, 2002 10:49 PM
Subject: Win32::OLE, or maybe POP3Client Module??
> Hello everyone!
>
Thanks. I will give it a go
- Andre'
- Original Message -
From: "Hamid Majidy" <[EMAIL PROTECTED]>
To: "Andre' Solomon" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, January 22, 2002 12:33 AM
Subject: RE: Perl Module for Server Statistics
> If your OS supports an SNMP age
Hello everyone!
I am still trying to read the subject line of all messages in my Outlook
Express Inbox. I know that this is possible using VB SCript - microsoft
provides comprehensive tutorials in their suppport pages, but I cannot seem
to get it to run in Perl.
I thought that maybe it w
Steven McKean wrote:
>
> How does on pack say a 4 byte field "1234" into a 2 byte field "12","34"?
my $field = '1234';
my ( $first, $last ) = $field =~ /(..)(..)/s;
# or
my ( $first, $last ) = unpack 'a2 a2', $field;
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PR
- Original Message -
From: "maureen" <[EMAIL PROTECTED]>
To: "Tanton Gibbs" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, January 23, 2002 5:04 PM
Subject: Re: Text file separators
> Thanks for your suggestion. I tried this:
>
> if( $username eq $in{username} &&
> >
Perl Gurus,
How does on pack say a 4 byte field "1234" into a 2 byte field "12","34"?
Steve McKean
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hello,
I downloaded a search script that is perfect for what I'm looking for, but
there's one problem that I can't figure out. In it, there's a variable for
what files and/or directories that you do NOT want searched ($DMZ). I can't
find the correct format to put in here and the script's tech s
You still are missing the check to see if the username even exists...I would
rewrite the foreach loop this way:
my $found = 0;
foreach my $i (@indata) {
chomp($i);
my ($username, $password) = split(/\ | /,$i);
if( $username eq $in{username} &&
$password ne $in{password} )
{
# i
Thanks for your suggestion. I tried this:
if( $username eq $in{username} &&
> $password ne $in{password} ) {
> # issue error here
> }
The test for username and password is now positive, every time text is
entered into the username and password fields, even when text entered
does not matc
$str =~ /^\d+$/;
This pattern matches the start of the string (^) followed by a sequence of
one or more digits (\d+), followed by the end of the string ($).
- Original Message -
From: "Pedro A Reche Gallardo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 23, 2002 5:
if ($str !~ /\D/)
^ ^ ^--any non-digit character
| does not match
-string to be checked
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Pedro A Reche
Gallardo
Sent: Wednesday, January 23, 2002 2:53 PM
To: [EMAIL P
Hi all, how can check if one string only contains digits?
Cheers
***
PEDRO A. RECHE , pHD TL: 617 632
3824
Dana-Farber Cancer Institute,FX: 617 632 4569
Harvard Medical School, EM: [EMAIL PROTECTED]
4
That's a very good point! You want something more like
if( $username eq $in{username} &&
$password ne $in{password} ) {
# issue error here
}
otherwise, it will issue an error for the first password that doesn't
match...even if it is the users!
- Original Message -
From: "Mark Ande
I haven't worked with cgi-lib.pl, so I'm confused. Is the password from the
web page being delivered as part of a hash called in? If so, then someone
else will need to help you with the if ($password ne $in{password}).
The other thing that I notice is that you are looking through the entire
pwd
On Jan 23, Timothy Johnson said:
> I'd agree that this is an inefficient way of doing this, but the
>link you're giving is not a good example to send people to. The code given
>will not create the kind of situation described, even if it does create less
>readable code. Perhaps a better id
The chomp should be inside the foreach loop
foreach my $i (@indata) {
chomp($i);
...
}
- Original Message -
From: "maureen" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, January 23, 2002 5:08 PM
Subject: Re: Text file separators
> Thanks for the detailed information!
I'd agree that this is an inefficient way of doing this, but the
link you're giving is not a good example to send people to. The code given
will not create the kind of situation described, even if it does create less
readable code. Perhaps a better idea would be to give an example of th
Thanks for the detailed information! I'm a beginner and appreciate
everyone's help.
I tried a number of the suggestions in this and other responses to my
post. This test:
if ($password ne $in{password}) is still not working. I'd appreciate
any suggestions.Here is the code:
open(FILE,"pwdata.t
> -Original Message-
> From: Timothy Johnson [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 23, 2002 4:28 PM
> To: 'Morrigan'; [EMAIL PROTECTED]
> Subject: RE: Can you have a function automatically make a set of
> numbered arrays?
>
> ...
> ${'array'.$arraycount}[1] = $lin
Morrigan wrote:
>
> I am trying to write a function which creates a set of
> numbered arrays for me (@array1, @array2, @array3 . .
> . @arrayn) so I can keep some of the input from a file
> I am reading in. I'm not sure if it's possible in the
> first place, or, if so, if my syntax is anywhere c
It would also work if you wrote it like this:
$count = 0;
$arraycount = 0;
while () {
$line = $_;
@line_items = split (/\s+/, $line);
${'array'.$arraycount}[0] = $line_items[3];
${'array'.$arraycount}[1] = $line_items[42];
++$count;
++$arraycount;
Your () should be [] w/in
$array($arraycount)[0] = $line_items[3];
$array($arraycount)[1] = $line_items[42];
and ++$array_count should be ++$arraycount.
or you could on the second assignment have $arraycount++ and not have extra line
farther down.
Wags ;)
Wags
I am trying to write a function which creates a set of
numbered arrays for me (@array1, @array2, @array3 . .
.. @arrayn) so I can keep some of the input from a file
I am reading in. I'm not sure if it's possible in the
first place, or, if so, if my syntax is anywhere close
to correct. This is th
> -Original Message-
> From: Pete Emerson [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 23, 2002 2:13 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Help reqd. for collecting data
>
>
> Here's my stab at it:
>
> #!/usr/bin/perl -w
>
> use strict;
>
> my %info;
>
> open INFILE, "$A
> okay so this works:
>
> @files = ;
> print "@files\n";
>
is obviously not a filehandle, or a
variable containing one. Hence it's a glob.
> but this doesn't:
>
> $search = "/home/*/*.txt";
> @files = <$search>;
> print "@files\n";
>
<$search> is treated as a named filehandle, since that i
> But can someone explain the <*.bak>? how does that work
> and what does it do? (and where is there a description
> of it's use)? Thanx
File glob. Returns an array of filenames which match the
regex /*\.bak$/ - basically those that end in .bak
This is a very Unix like feature of Perl, which
Here's my stab at it:
#!/usr/bin/perl -w
use strict;
my %info;
open INFILE, "$ARGV[0]" or die "Can't open file: $!\n"; # Open file specified on
command line
while () {
chomp;
my ($date, @data)=split; # Capture the date, then the rest
$date=~s/_\d{4}$//; # Re
in the man perlfunc page we see:
unlink LIST
unlink Deletes a list of files. Returns the number of
files successfully deleted.
$cnt = unlink 'a', 'b', 'c';
unlink @goners;
unlink <*.bak>;
Note: "unlink" wil
this is the easy way (requires the Date::Calc module):
use Date::Calc qw(Week_Number Today);
print Week_Number(Today());
-Original Message-
From: Frank [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 23, 2002 10:45 AM
To: [EMAIL PROTECTED]
Subject: Re: Number of the week
On Wed,
Wouldn't 'getpwnam' be easier to use? (see man perlfunc)
-Original Message-
From: Christo Rademyer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 23, 2002 7:39 AM
To: [EMAIL PROTECTED]; Briac Pilpré
Subject: Re: passwd
THANX BIG TIME
- Original Message -
From: "Briac Pilpré
Depending on the version that you are using there are 2 different File::Find
modules.
The Module changes greatly in the perl version 5.6.1+.
I tried using the older version of the module with 5.005 and it just didn't
cut it for me. The new version allows following symbolic links and
preprocessing
"Jenda Krynicky" <[EMAIL PROTECTED]> wrote in message
3C4DB27B.15762.1FE92DCC@localhost">news:3C4DB27B.15762.1FE92DCC@localhost...
> From: "Kevin Kirwan" <[EMAIL PROTECTED]>
>
> > Guys,
> > I've got a newbie question: I'm writing a Perl program to get some
> > system information about
33 matches
Mail list logo