[23902] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 6104 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Feb 10 06:05:48 2004

Date: Tue, 10 Feb 2004 03:05:08 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 10 Feb 2004     Volume: 10 Number: 6104

Today's topics:
        $ENV{'URL'} <todd@asgweb.net>
    Re: $ENV{'URL'} (Walter Roberson)
    Re: $ENV{'URL'} <tadmc@augustmail.com>
    Re: $ENV{'URL'} <nospam@bigpond.com>
    Re: (quickie) print in place? <not_a_real@adress.getting.too.much.spam.org>
    Re: (quickie) print in place? <not_a_real@adress.getting.too.much.spam.org>
    Re: (quickie) print in place? <usenet@morrow.me.uk>
    Re: (quickie) print in place? <jwillmore@remove.adelphia.net>
        ActiveState problem using IPC::Open3 with IO::Select (J. Romano)
    Re: Anyone using Berkley XML DB w/Perl (of course)...? <ceo@nospan.on.net>
    Re: Anyone using Berkley XML DB w/Perl (of course)...? <vetro@online.no>
    Re: converting scalar to an array of elements <dha@panix.com>
    Re: DBI::mysql column names as hash keys? (Tony)
    Re: Does anybody know... <djo@pacifier.com>
    Re: Encrypt and Decrypt for text ... <matthew.garrish@sympatico.ca>
    Re: Encrypt and Decrypt for text ... <jwillmore@remove.adelphia.net>
    Re: Encrypt and Decrypt for text ... <nospam@bigpond.com>
        file size OT <nospam@nospam.net>
    Re: file size OT <Joe.Smith@inwap.com>
    Re: file size OT <nospam@nospam.net>
    Re: NTP module <jwillmore@remove.adelphia.net>
    Re: Pearl "Print Statement" Question (Information)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Mon, 09 Feb 2004 21:44:09 -0700
From: Todd Anderson <todd@asgweb.net>
Subject: $ENV{'URL'}
Message-Id: <40286147.DAAB68FD@asgweb.net>

Hello,
$ENV{'SERVER_NAME'} this indentifies a server name
$ENV{'SCRIPT_NAME'} this indentifies a script name
does anyone know what code would be used to indentify  the url used to
access a site?
Thanks in advance for your help.



------------------------------

Date: 10 Feb 2004 04:51:18 GMT
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Subject: Re: $ENV{'URL'}
Message-Id: <c09o06$6k5$1@canopus.cc.umanitoba.ca>

In article <40286147.DAAB68FD@asgweb.net>,
Todd Anderson  <todd@asgweb.net> wrote:
:$ENV{'SERVER_NAME'} this indentifies a server name
:$ENV{'SCRIPT_NAME'} this indentifies a script name
:does anyone know what code would be used to indentify  the url used to
:access a site?

The appropriate environment variable is documented in any good CGI
reference work. (e.g., w3c.org). Find the variable name and
wrap it in $ENV{} .
-- 
Positrons can be described as electrons traveling backwards in time.
Certainly many Usenet arguments about the past become clearer when they
are re-interpreted as uncertainty about the future.
   -- Walter Roberson


------------------------------

Date: Mon, 9 Feb 2004 23:19:17 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: $ENV{'URL'}
Message-Id: <slrnc2gqel.46k.tadmc@magna.augustmail.com>

Todd Anderson <todd@asgweb.net> wrote:

> $ENV{'SERVER_NAME'} this indentifies a server name
> $ENV{'SCRIPT_NAME'} this indentifies a script name
> does anyone know what code would be used to indentify  the url used to
> access a site?


   $ENV{'rectal discharge'}


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: Tue, 10 Feb 2004 15:49:26 +1000
From: Gregory Toomey <nospam@bigpond.com>
Subject: Re: $ENV{'URL'}
Message-Id: <c09rd2$1442k4$1@ID-202028.news.uni-berlin.de>

Todd Anderson wrote:

> Hello,
> $ENV{'SERVER_NAME'} this indentifies a server name
> $ENV{'SCRIPT_NAME'} this indentifies a script name
> does anyone know what code would be used to indentify  the url used to
> access a site?
> Thanks in advance for your help.

HINT: Your question has nothing to do with Perl
HINT: This group is not about web wevers


But having said that, the following snippet of code will help you print out
your environment variables. Use it inside cgi to see what your web server
is sending.

print "$_=$ENV{$_}" for sort keys(%ENV);


gtoomey



------------------------------

Date: Mon, 9 Feb 2004 18:30:05 -0800
From: "Damian" <not_a_real@adress.getting.too.much.spam.org>
Subject: Re: (quickie) print in place?
Message-Id: <c09fjl$14jneh$1@ID-196529.news.uni-berlin.de>

gnari wrote:
> "Damian" <not_a_real@adress.getting.too.much.spam.org> wrote in
> message news:c09aeu$14hlvn$1@ID-196529.news.uni-berlin.de...
>> was wondering how exactly do you print(...) in place? Like the
>> percent counter for installers like linux's rpm. In other words so
>> the output keeps going to the same spot in stead of advancing the
>> cursor.
>>
>> If this is something only on Linux/Unix thats fine, as thats the only
>> place I really need to do this. Though portability never hurts.
>
> "\r"
>
> gnari

This this a good way of doing it? This is what I just tried:

#!/usr/local/bin/perl -w

use strict;

$| = 1; # Needs to be non zero so you cna see print's in a loop.

for my $i (0..10) {
   my $c = $i * 10;
   print "Percent complete: $c %\r";

   sleep(1); # Sleep for 1 second.
}
print "Percent complete: Done!\n"


I notice though that that if you hit a key while it's looping (logged
into ssh), it shifts the whole thing over, then the next itereation
comes along and rewites that portion, ending up with the right hand bit
of text from the shifted part rtemaining there. Is the only way to make
sure that everything up to the end of thel ine is cleared, short of
manually padding it with spaces, which would require I find out the
column width and then find out how much space is left. Theres gotta be a
beter way to do this.




------------------------------

Date: Mon, 9 Feb 2004 18:32:32 -0800
From: "Damian" <not_a_real@adress.getting.too.much.spam.org>
Subject: Re: (quickie) print in place?
Message-Id: <c09fo8$14d1lb$1@ID-196529.news.uni-berlin.de>

Damian wrote:
> gnari wrote:
> I notice though that that if you hit a key while it's looping (logged
> into ssh), it shifts the whole thing over, then the next itereation
> comes along and rewites that portion, ending up with the right hand
> bit of text from the shifted part rtemaining there. Is the only way
> to make sure that everything up to the end of thel ine is cleared,
> short of manually padding it with spaces, which would require I find
> out the column width and then find out how much space is left. Theres
> gotta be a beter way to do this.

Or would it be bettter to supress input / local echo? Is this even
possible and a good way to go about this?




------------------------------

Date: Tue, 10 Feb 2004 02:48:16 +0000 (UTC)
From: Ben Morrow <usenet@morrow.me.uk>
Subject: Re: (quickie) print in place?
Message-Id: <c09gpg$gv2$1@wisteria.csv.warwick.ac.uk>


"Damian" <not_a_real@adress.getting.too.much.spam.org> wrote:
> Damian wrote:
> > I notice though that that if you hit a key while it's looping (logged
> > into ssh), it shifts the whole thing over, then the next itereation
> > comes along and rewites that portion, ending up with the right hand
> > bit of text from the shifted part rtemaining there. Is the only way
> > to make sure that everything up to the end of thel ine is cleared,
> > short of manually padding it with spaces, which would require I find
> > out the column width and then find out how much space is left. Theres
> > gotta be a beter way to do this.
> 
> Or would it be bettter to supress input / local echo? Is this even
> possible and a good way to go about this?

Depending on what you're doing, yes, it may well be.

See Term::ReadKey and (as I said before) Term::ANSIScreen.

Ben

-- 
   Although few may originate a policy, we are all able to judge it.
                                             - Pericles of Athens, c.430 B.C.
  ben@morrow.me.uk


------------------------------

Date: Tue, 10 Feb 2004 00:47:33 -0500
From: James Willmore <jwillmore@remove.adelphia.net>
Subject: Re: (quickie) print in place?
Message-Id: <pan.2004.02.10.05.47.31.440608@remove.adelphia.net>

On Mon, 09 Feb 2004 18:30:05 -0800, Damian wrote:

<snip>

> 
> This this a good way of doing it? This is what I just tried:
> 
> #!/usr/local/bin/perl -w
> 
> use strict;
> 
> $| = 1; # Needs to be non zero so you cna see print's in a loop.
> 
> for my $i (0..10) {
>    my $c = $i * 10;
>    print "Percent complete: $c %\r";
> 
>    sleep(1); # Sleep for 1 second.
> }
> print "Percent complete: Done!\n"
> 
> 
> I notice though that that if you hit a key while it's looping (logged
> into ssh), it shifts the whole thing over, then the next itereation
> comes along and rewites that portion, ending up with the right hand bit
> of text from the shifted part rtemaining there. Is the only way to make
> sure that everything up to the end of thel ine is cleared, short of
> manually padding it with spaces, which would require I find out the
> column width and then find out how much space is left. Theres gotta be a
> beter way to do this.

If you want to have a progress bar or something similar, try
Term::ProgressBar.

HTH

-- 
Jim

Copyright notice: all code written by the author in this post is
 released under the GPL. http://www.gnu.org/licenses/gpl.txt 
for more information.

a fortune quote ...
This fortune is inoperative.  Please try another. 




------------------------------

Date: 9 Feb 2004 19:18:05 -0800
From: jl_post@hotmail.com (J. Romano)
Subject: ActiveState problem using IPC::Open3 with IO::Select
Message-Id: <b893f5d4.0402091918.5ad1b9e6@posting.google.com>

Dear Perl Community,

I am interested in using the IPC::Open2 and IPC::Open3 modules.  From
reading the documentation I know that a potential problem is that a
program I am talking to may not flush its output, possibly causing a
deadlock.  Therefore, I would like to check to see if input is waiting
before reading from the process, by following the advice mentioned in
IPC::Open3's perldoc:

   If you try to read from the child's stdout writer and their stderr
   writer, you'll have problems with blocking, which means you'll want
to
   use select() or the IO::Select, which means you'd best use
sysread()
   instead of readline() for normal stuff.

So I wrote a program which uses IO::Select to check for input waiting
to be read, and used sysread() to read its input, one character at a
time.  Here is a short program that does just that:

#!/usr/bin/perl -w

use strict;
use IPC::Open3;
use IO::Select;
$| = 1; # autoflush STDOUT

# Declare filehandles and command to use:
my ($w, $r, $e);
my $cmd = 'perl -ne "$| = 1; print uc($_)"';

# Open the process and set the selector:
my $pid = open3($w, $r, $e, $cmd);
my $selector = IO::Select->new($r);

while (<>)
{
   print $w $_;  # send line to process

   sleep 1;  # allow some time for request to process

   # print out output from process, if any exists:
   while ($selector->can_read(0))
   {
      my $char;
      sysread($r, $char, 1);
      print $char;
   }
}
__END__

A quick note:  The program that is spawned which I communicate with is
specified near the top of the script in the line:

   my $cmd = 'perl -ne "$| = 1; print uc($_)"';

This is basically a program that does nothing but print out a copy of
its input in capital letters.  Also note that $| (the autoflush
variable) is set to non-zero (ensuring that the output is flushed
frequently).

Back to the problem:  This short script works perfect on the two UNIX
machines I tested it on, but it doesn't work on the  two versions of
ActiveState ActivePerl I tried it on.  When I ran this script using
ActivePerl, it behaved as though the inner while loop did not exist.

For anyone who is interested, "perl -v" on one of the machines printed
the following information:

   This is perl, v5.8.0 built for MSWin32-x86-multi-thread
   (with 1 registered patch, see perl -V for more detail)
   Binary build 805 provided by ActiveState Corp.
http://www.ActiveState.com
   Built 18:08:02 Feb  4 2003

What's more is, when I replaced the inner while loop with the line:

   print scalar <$r>;

the program worked just fine.  This doesn't help, however, because I
want to be able to check to see if there is any data waiting to be
read (using IO::Select) before I try reading, otherwise I might cause
a deadlock.

I also tried the same thing with IPC::Open2, and I got the same
situation:  it worked perfectly on UNIX, but not on ActivePerl.

I seached the newsgroups for any mention of this problem with
ActivePerl, but nothing turned up.

So am I doing anything wrong?  Am I missing something?  Do other
ActivePerl users have the same problem?  And if so, is it a bug in
ActivePerl?

   Thanks in advance for any responses,

   Jean-Luc


------------------------------

Date: Tue, 10 Feb 2004 02:37:12 GMT
From: Chris <ceo@nospan.on.net>
Subject: Re: Anyone using Berkley XML DB w/Perl (of course)...?
Message-Id: <stXVb.20156$Ju1.7084@newssvr16.news.prodigy.com>

Robert wrote:
> Chris wrote:
> 
>> I'm trying to find some Perl API support (read "CPAN module") for 
>> using Sleepcat's Berkley XML DB, but I'm coming up blank.  Sleepcat's 
>> web site is Java and C++ centric and I see no Perl information there 
>> though an article I read on XML DB claims there is Perl support.  
>> Googling for a suitable module produced nothing of interest, not to 
>> mention such searching is muddied by www.xmldb.org which uses a lot of 
>> Perl-like "XML::DB" notation.
>>
>> It would appear that Berkley's XML DB coupled with XML::Dumper poses 
>> some interesting possibilities for run-time object persistence between 
>> client and server platforms... tantalizing to say the least.
>>
>> Surely I would be spared having to download the Java support and 
>> convert to Perl modules... 8-(  I guess I can try their message list, 
>> but thought a quick note here would maybe turn up something solid.
>>
>> Chris
>> -----
> 
> 
> And if someone does create a binary (esp. for ActiveState) please share 
> it.  :-)

Well, if I combine all the sentiments, it seems that maybe a more 
Perl-like wrapper/module could be in order.  I doubt I will have the 
time to look at it seriously for a little while yet, but I might venture 
into it here before too long.  It seems there might actually be some 
interest in that sort of thing, myself included.  And I *was* wanting it 
initially for ActiveState in the immediate, even though I tend to prefer 
Linux.  I'd *really* like to play with this XML DB some...  The object 
persistence this could bring to some stateless apps would be fun to play 
with over and above sessions (CGI::Sessions, etc.).

I'll download the Linux source and follow the lead I was given and see 
where that takes me.  Should have thought to do that (check out the 
Linux source) already.

Thanks all,
Chris
-----
Chris Olive
chris -at- --spammers-are-bogus-- technologEase -dot- com
http://www.technologEase.com
(pronounced "technologies")


------------------------------

Date: Tue, 10 Feb 2004 10:28:10 +0100
From: Vetle Roeim <vetro@online.no>
Subject: Re: Anyone using Berkley XML DB w/Perl (of course)...?
Message-Id: <m3u11zp9lh.fsf@quimby.dirtyhack.org>

* Ben Morrow
> Vetle Roeim <vetro@online.no> wrote:
>> * ceo@nospan.on.net
>> > I'm trying to find some Perl API support (read "CPAN module") for
>> > using Sleepcat's Berkley XML DB, but I'm coming up blank. 
>> 
>>   You're not going to find it on CPAN, unfortunately. To install it, I
>>   downloaded the source code, compiled it, and then installed the Perl
>>   module from dbxml-1.2.0/src/perl.
>
> Having taken a look at that: bleech. Is it *quite* necessary to
> trample on that many different (including top-level and pragmatic)
> namespaces? And is it really necessary to have the interface be so
> C++ish?

  I didn't like it either. There exists a set of
  XML::DB::Database-modules that provide interfaces to a couple of XML
  databases. I haven't checked them out, though.

  They may provide a better interface.


[...]

-- 
#!/usr/bin/vr


------------------------------

Date: Tue, 10 Feb 2004 03:14:10 +0000 (UTC)
From: "David H. Adler" <dha@panix.com>
Subject: Re: converting scalar to an array of elements
Message-Id: <slrnc2gj42.iud.dha@panix2.panix.com>

In article <40277717.7E28A226@acm.org>, John W. Krahn wrote:
> "David H. Adler" wrote:
>> 
>> In article <40257AAB.4FBEC5FA@acm.org>, John W. Krahn wrote:
>> > Chuckb wrote:
>> >>
>> >> I should know this but, what is the quickest way to convert a scalar value
>> >> into an array?
>> >> Ex: $name="Fred";
>> >>     so that
>> >> $arrayname[0]="F";
>> >> $arrayname[1]="r";
>> >> $arrayname[2]="e";
>> >> $arrayname[3]="d";
>> >
>> > I don't know which is the quickest, you'll have to use Benchmark for that.
>> 
>> [snip various methods]
>> 
>> While we're having fun, how about...
>> 
>> unshift @arrayname, chop $string_containing_Fred while $string_containing_Fred;
>> 
>> ...although I have a feeling that may not scale well.
> 
> You are going to be a character short in @arrayname if the first
> character in $string_containing_Fred is '0'.  :-)

I am insulted that you would think I would use an inappropriate variable
name. Clearly, you are thinking of $string_containing_0_and_stuff :-)

dha

-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
It was when a cow-orker proudly showed me his Java Ring that I finally
realised that Java was nothing more than a huge April Fool joke that had
got out of hand.	- Andy Wardley


------------------------------

Date: 10 Feb 2004 00:48:17 -0800
From: hawkmoon1972@hotmail.com (Tony)
Subject: Re: DBI::mysql column names as hash keys?
Message-Id: <c90e5468.0402100048.525cb3f4@posting.google.com>

very useful insights gnari

thanks very much


------------------------------

Date: Tue, 10 Feb 2004 00:22:42 -0800
From: "David Oswald" <djo@pacifier.com>
Subject: Re: Does anybody know...
Message-Id: <2_Gdnd0r6OdICbXdRVn-vA@adelphia.com>


"Ondra" <neufingero@quick.cz> wrote in message
news:9dd8be90.0402090336.a0bf722@posting.google.com...
> Hello,
>   does anybody know what is this:
>
>   my $tag
>   $line =~ /<(\S+)[^>]*?>/;
>     $tag = $1 || "";  /*****exactly this***/

Honestly, it's a mistake.
You should never rely on $1 in any way unless you first ensure that the
match succeeded.  It is entirely possible that $1 may still contain an
artifact of a previous pattern match, even if the most recent match failed.
That being the case, you cannot assume that $1 will be 'undef' or 'false' if
the most recent pattern match failed, for, if there were previously
successful pattern matches with capturing parens, $1 will still contain the
results of that successful capture.

You really should be checking the success of the match before fiddling with
$1, et. al.






------------------------------

Date: Mon, 9 Feb 2004 20:56:56 -0500
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: Encrypt and Decrypt for text ...
Message-Id: <BTWVb.3062$y07.232547@news20.bellglobal.com>


"stratus" <gis86508@cissol1.cis.nctu.edu.tw> wrote in message
news:c099ku$166k$1@news.cis.nctu.edu.tw...
> Is there any share tools in Unix,or even in PERL for encrypting the
> ascii text to binary or anything else and decrypting it to ascii text.
> Thanks a lot !!!
>

We don't deal in shareware here (and it's "are there" not "is there", and
Perl, not PERL). That you would even ask if such tools exists probably means
this is going to fall on deaf ears, but there are many modules on cpan that
deal with encrypting and decrypting all kinds of data.

Matt




------------------------------

Date: Tue, 10 Feb 2004 00:26:01 -0500
From: James Willmore <jwillmore@remove.adelphia.net>
Subject: Re: Encrypt and Decrypt for text ...
Message-Id: <pan.2004.02.10.05.25.59.845114@remove.adelphia.net>

On Tue, 10 Feb 2004 00:46:22 +0000, stratus wrote:

> Is there any share tools in Unix,or even in PERL for encrypting the
> ascii text to binary or anything else and decrypting it to ascii text.
> Thanks a lot !!!
> 
> Or can tell me how to do it !!

Converting (*not* encrypting) ASCII text to a binary format is *not* going
to hide your code (I'm thinking this was the point of your post, right?).

perldoc -q 'hide'

-- 
Jim

Copyright notice: all code written by the author in this post is
 released under the GPL. http://www.gnu.org/licenses/gpl.txt 
for more information.

a fortune quote ...
Make it myself?  But I'm a physical organic chemist! 




------------------------------

Date: Tue, 10 Feb 2004 16:00:43 +1000
From: Gregory Toomey <nospam@bigpond.com>
Subject: Re: Encrypt and Decrypt for text ...
Message-Id: <c09s28$14msda$1@ID-202028.news.uni-berlin.de>

stratus wrote:

> Is there any share tools in Unix,or even in PERL for encrypting the
> ascii text to binary or anything else and decrypting it to ascii text.
> Thanks a lot !!!
> 
> Or can tell me how to do it !!

Assuming you are not trying to do anything naughty, search for "symmetric
encryption". 
http://www.webopedia.com/TERM/S/symmetric_encryption.html

The best known algorithm is DES
http://www.itl.nist.gov/fipspubs/fip46-2.htm


I have a quick-and-dirty Perl script that will encrypt a string of length s
into a longer string of length 2s, and a decryption routine that will take
the longer string and convert back to the original plaintext string.
You should be able to whip up something similar - just like baking a cake
but you invent your own recipe!

gtoomey


------------------------------

Date: Tue, 10 Feb 2004 04:39:15 GMT
From: "Jeff Thies" <nospam@nospam.net>
Subject: file size OT
Message-Id: <TfZVb.20260$GO6.17227@newsread3.news.atl.earthlink.net>

  I have a "demand" for a file upload progress bar.

I've figured out how to return the number of bytes uploaded/saved back to
the browser. What I haven't figured out is how to read the file's size,
either client or server side (perl), so I can calculate a percentage.

I would have thought this was embedded in the file somewhere, as well as
it's content type. I can't find it, do I have this wrong?

  I'm terribly sorry for asking this question here, I'm a bit desperate for
an answer and I know someone here knows the answer. I haven't found it
elsewhere.

  Jeff




------------------------------

Date: Tue, 10 Feb 2004 08:05:38 GMT
From: Joe Smith <Joe.Smith@inwap.com>
Subject: Re: file size OT
Message-Id: <mh0Wb.209337$Rc4.1719947@attbi_s54>

Jeff Thies wrote:

> I've figured out how to return the number of bytes uploaded/saved back to
> the browser. What I haven't figured out is how to read the file's size,
> either client or server side (perl), so I can calculate a percentage.

The size of the file on the server is
    $size = -s $file;

The size of the file on the client is not available.
With a multi-file POST, the Content-length does not give any indication
as to the current file's size.

Upload progress bars should be implemented on the client's browser,
not the server.
	-Joe


------------------------------

Date: Tue, 10 Feb 2004 10:12:33 GMT
From: "Jeff Thies" <nospam@nospam.net>
Subject: Re: file size OT
Message-Id: <l82Wb.19346$jH6.2273@newsread1.news.atl.earthlink.net>

> > I've figured out how to return the number of bytes uploaded/saved back
to
> > the browser. What I haven't figured out is how to read the file's size,
> > either client or server side (perl), so I can calculate a percentage.
>
> The size of the file on the server is
>     $size = -s $file;

That looks like the file size is not available until after the file has been
saved.
Is that right?

  Jeff

>
> The size of the file on the client is not available.
> With a multi-file POST, the Content-length does not give any indication
> as to the current file's size.
>
> Upload progress bars should be implemented on the client's browser,
> not the server.
> -Joe




------------------------------

Date: Tue, 10 Feb 2004 00:29:44 -0500
From: James Willmore <jwillmore@remove.adelphia.net>
Subject: Re: NTP module
Message-Id: <pan.2004.02.10.05.29.43.195314@remove.adelphia.net>

On Mon, 09 Feb 2004 13:59:17 -0800, David O in Seattle wrote:

> On Mon, 09 Feb 2004 12:44:11 -0500, James Willmore
> <jwillmore@remove.adelphia.net> wrote:
> 
>>I need to monitor a NTP (time) server.  I searched CPAN and did not see
>>a NTP module.
>>
>>So, is there one ... and I missed it?
>>
>>Thanks
> 
> A quick Google search and....
> 
> http://www.kloth.net/software/sntp.php
> 
> It's not a module, but it might help you anyway.

I looked it over.  You're right, it's not a module.  But, it does help in
decoding the packets from the NTP server - which is something I was
looking to do.

I tried various un/pack's, along with using ord, to get a human readable
output from the packets, but I failed :-(  So, if this does what it's
supposed to do, and the author approves, I'll incorporate it into code I'd
like to release to CPAN.

Thanks.

-- 
Jim

Copyright notice: all code written by the author in this post is
 released under the GPL. http://www.gnu.org/licenses/gpl.txt 
for more information.

a fortune quote ...
After a number of decimal places, nobody gives a damn. 




------------------------------

Date: 10 Feb 2004 00:38:04 -0800
From: vpnavy@yahoo.com (Information)
Subject: Re: Pearl "Print Statement" Question
Message-Id: <6652ec03.0402100038.51f4613c@posting.google.com>

SNIP 
> AAAARGH!
> it was a CGI question after all !
> 
> gnari

Gosh, I should have said it was a CGI question.  Hey, you couldn't
read my mind?  SMILE

Thanks again.


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 6104
***************************************


home help back first fref pref prev next nref lref last post