[24468] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6651 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jun 4 11:05:53 2004

Date: Fri, 4 Jun 2004 08:05:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 4 Jun 2004     Volume: 10 Number: 6651

Today's topics:
        a windows registry monitor (justme)
        ANN: List::SkipList v0.65 <perl_usenet.20.wlkngowl@spamgourmet.com>
        ANN: Win32::EventLog::Carp 1.30 released <perl_usenet.20.wlkngowl@spamgourmet.com>
        customize unix (Thorsten Gottschalk)
    Re: customize unix <usenet@morrow.me.uk>
    Re: customize unix <vladimir@NoSpamPLZ.net>
    Re: customize unix <uri@stemsystems.com>
        Cute bit of Perl to Assign $1,$2 to named variables <david@tvis.co.uk>
    Re: Cute bit of Perl to Assign $1,$2 to named variables <bernard.el-haginDODGE_THIS@lido-tech.net>
    Re: Cute bit of Perl to Assign $1,$2 to named variables <ittyspam@yahoo.com>
    Re: Cute bit of Perl to Assign $1,$2 to named variables <david@tvis.co.uk>
    Re: Cute bit of Perl to Assign $1,$2 to named variables <uri@stemsystems.com>
    Re: Cute bit of Perl to Assign $1,$2 to named variables <ittyspam@yahoo.com>
    Re: Cute bit of Perl to Assign $1,$2 to named variables <uri@stemsystems.com>
    Re: Cute bit of Perl to Assign $1,$2 to named variables <david@tvis.co.uk>
        Delete a line out of a flat file database (Mark Constant)
    Re: Delete a line out of a flat file database <ittyspam@yahoo.com>
        HEY, YOU!  POE 0.29 has been released! <troc@pobox.com>
    Re: LWP::UserAgent problem - 500 error (RP)
        Net::SSH::(W32)Perl error checking (SlimClity)
        Novice how to design this script? (arc)
    Re: Novice how to design this script? <noreply@gunnar.cc>
    Re: Novice how to design this script? <nospam@bigpond.com>
    Re: opening multiple pipes <bik.mido@tiscalinet.it>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 4 Jun 2004 05:41:24 -0700
From: eight02645999@yahoo.com (justme)
Subject: a windows registry monitor
Message-Id: <c0837966.0406040441.5bc9f333@posting.google.com>

hi

i am trying to code a small perl program to monitor the windows
registry. The idea is to create a baseline on some keys like
LOCAL_MACHINE or USERS, ( the whole registry would be too big ), where
the RUN and RUNONCE keys are located.
Then i would poll these registry locations and see if there are
suspicious keys added by comparing it against the baseline. The script
will be scheduled to check every once in a while. I have checked CPAN
for Win32::Registry. I wonder if it is the right tool to help me in
this purpose...?
thanks


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

Date: Fri, 4 Jun 2004 02:02:35 GMT
From: Robert Rothenberg <perl_usenet.20.wlkngowl@spamgourmet.com>
Subject: ANN: List::SkipList v0.65
Message-Id: <HysCvH.1KrI@zorch.sf-bay.org>

List::SkipList has been uploaded to PAUSE and should appear on a CPAN
mirror near you as:

      $CPAN/authors/id/R/RR/RRWO/List-SkipList-0.65.tar.gz

NAME
     List::SkipList - Perl implementation of skip lists

REQUIREMENTS
     Perl 5.6.1 is required.

     The following non-standard modules are required:

       enum

     Carp::Assert is no longer required.  However, the assertions can
     be uncommented for debugging.

SYNOPSIS
       my $list = new List::SkipList();

       $list->insert( 'key1', 'value' );
       $list->insert( 'key2', 'another value' );

       $value = $list->find('key2');

       $list->delete('key1');

DESCRIPTION
     This is an implementation of skip lists in Perl.  What are "skip
     lists"?

       Skip lists are a probabilistic data structure that seem likely
       to supplant balanced trees as the implementation method of
       choice for many applications. Skip list algorithms have the same
       asymptotic expected time bounds as balanced trees and are
       simpler, faster and use less space.(*)

     Skip lists are similar to linked lists, except that they have
     random links at various levels that allow searches to skip over
     sections of the list, like so:

       4 +---------------------------> +----------------------> +
         |                             |                        |
       3 +------------> +------------> +-------> +-------> +--> +
         |              |              |         |         |    |
       2 +-------> +--> +-------> +--> +--> +--> +-------> +--> +
         |         |    |         |    |    |    |         |    |
       1 +--> +--> +--> +--> +--> +--> +--> +--> +--> +--> +--> +
              A    B    C    D    E    F    G    H    I    J   NIL

     A search would start at the top level: if the link to the right
     exceeds the target key, then it descends a level.

     More information is available in the module documentation.

     (*) Bill Pugh, inventor of skip lists.  Quoted from WikiPedia
         <http://en.wikipedia.org/wiki/Skip_list>

REVISION HISTORY
     Changes since v0.63:

     0.65 Thu June  3 2004
	- updated README

     0.64 Thu June  3 2004
         - updated examples in documentation of custom node
	- minor optimizations and code cleanup
	- commented-out call to prev() in _debug
	- removed use of Carp::Assert in tests
	- redesigned benchmark script and included parse-out.pl
	- updated Benchmark.txt
	- updated README

     A detailed revision history is in the Changes file included with
     this distribution.

CAVEATS
     Skip lists are non-deterministic.  Because of this, bugs in programs
     that use this module may be subtle and difficult to reproduce without
     many repeated attempts.

AUTHOR
     Robert Rothenberg <rrwo at cpan.org>

LICENSE
     Copyright (c) 2003-2004 Robert Rothenberg. All rights reserved. This
     program is free software; you can redistribute it and/or modify it
     under the same terms as Perl itself.




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

Date: Fri, 4 Jun 2004 01:57:55 GMT
From: Robert Rothenberg <perl_usenet.20.wlkngowl@spamgourmet.com>
Subject: ANN: Win32::EventLog::Carp 1.30 released
Message-Id: <HysCvw.2038@zorch.sf-bay.org>

The latest version of Win32::EventLog::Carp has been uploaded to PAUSE
and should begin showing up in a CPAN mirror near you at

     $CPAN/authors/id/R/RR/RRWO/Win32-EventLog-Carp-1.30.tar.gz

NAME
     Win32::EventLog::Carp - for carping in the Windows NT Event Log

REQUIREMENTS
       Carp
       Win32::EventLog

REVISION HISTORY
     Changes since Win32::EventLog::Carp v1.21.  (Note: potential
     incompatabilities are marked with '*'.)

     1.30  Thu June  3 2004
	- added tests
	- fixed issue with uninitialized values (RT#5408).
	- added Build.PL as alternative to Makefile.PL
	- added META.yml to distribution
	* source registration disabled by default; must be enabled in import
	- renamed global variables with initial caps
	- added note in POD about Windows 2003/IIS security policy
	- added require for Carp::Heavy because of longmess_heavy and
	  shortmess_heavy routines
	- added note in POD about warnings from Win32::EventLog

     A detailed revision history is in the Changes file included with
     this distribution.

SYNOPSIS
       use Win32::EventLog::Carp;
       croak "We're outta here!";

       use Win32::EventLog::Carp qw(cluck);
       cluck "This is how we got here!";

DESCRIPTION
     `Win32::EventLog::Carp' traps warnings and fatal errors in Perl and
     reports these errors in the Windows NT Event Log. This is useful for
     scripts which run as services or through the scheduler, and for
     CGI/ISAPI scripts.

     The interface is similar to `Carp': the `carp', `croak' and `confess'
     functions are exported (with `cluck' being optional). You need only
     change references of "Carp" to "Win32::EventLog::Carp" to begin using
     this module.

     A more detailed description can be found in the module's POD docu-
     mentation.

AUTHOR
     Robert Rothenberg <rrwo at cpan.org>

LICENSE
     Copyright (c) 2000-2004 Robert Rothenberg. All rights reserved. This
     program is free software; you can redistribute it and/or modify it under
     the same terms as Perl itself.




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

Date: 4 Jun 2004 05:46:38 -0700
From: iqrity@web.de (Thorsten Gottschalk)
Subject: customize unix
Message-Id: <beb38f7.0406040446.364dd1a7@posting.google.com>

Hello all,

I normal install 1-2 unix systems per week. The service which is
running this machines differs over time.
So I have a kind of basic installation from a cd rom, after that I
doing some custimsations to the system. E.g. additional entries in the
/etc/hosts, add users, change file rights, add some scripts, change
config files in /etc ....

Now I want to write a perl script that to all this staff. But I do not
want to program this hardcoded in my perl script. I want a kind of
controll file where I describe my changes and hand over this file to
script which then do these changes.
I have reduced these function I need:

- change right, owners of file
- copy file
- append text to file
- add/delete users
- execute other programms

So is there any module out there which can support me in my wishes?

ciao
Thorsten


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

Date: Fri, 4 Jun 2004 14:26:46 +0000 (UTC)
From: Ben Morrow <usenet@morrow.me.uk>
Subject: Re: customize unix
Message-Id: <c9q0r5$7ad$1@wisteria.csv.warwick.ac.uk>


Quoth iqrity@web.de (Thorsten Gottschalk):
> Hello all,
> 
> I normal install 1-2 unix systems per week. The service which is
> running this machines differs over time.
> So I have a kind of basic installation from a cd rom, after that I
> doing some custimsations to the system. E.g. additional entries in the
> /etc/hosts, add users, change file rights, add some scripts, change
> config files in /etc ....
> 
> Now I want to write a perl script that to all this staff. But I do not
> want to program this hardcoded in my perl script. I want a kind of
> controll file where I describe my changes and hand over this file to
> script which then do these changes.
> I have reduced these function I need:
> 
> - change right, owners of file

chmod, chown

> - copy file

File::Copy

> - append text to file

open my $FH, '>>', $file or die...;

> - add/delete users

If your system has usermod/useradd/etc. programs, I would invoke these.
Otherwise, if you have Linux-like /etc/passwd and /etc/shadow files, you
could use Linux::usermod... though I have to say I wouldn't use it on a
running system.

> - execute other programms

system

I don't usually say this, but this strikes me as a better job for a
shell script than Perl...

Ben

-- 
  Joy and Woe are woven fine,
  A Clothing for the Soul divine       William Blake
  Under every grief and pine          'Auguries of Innocence'
  Runs a joy with silken twine.                                ben@morrow.me.uk


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

Date: Fri, 04 Jun 2004 14:32:59 GMT
From: lostriver <vladimir@NoSpamPLZ.net>
Subject: Re: customize unix
Message-Id: <vK%vc.65846$F75.715777@weber.videotron.net>

On 4 Jun 2004 05:46:38 -0700, Thorsten Gottschalk wrote:
> Hello all,
>
> I normal install 1-2 unix systems per week. 

So you basicaly doing a monkey job over and over and over.....
Do not waste time and learn how to setup hands off install
servers. Search on www.google.com for 'jumpstart' if your 
'unix' is Solaris and 'kickstart' if it is Linux.

good luck.


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

Date: Fri, 04 Jun 2004 14:52:59 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: customize unix
Message-Id: <x7u0xrnzn9.fsf@mail.sysarch.com>

>>>>> "BM" == Ben Morrow <usenet@morrow.me.uk> writes:

  BM> Quoth iqrity@web.de (Thorsten Gottschalk):

  >> Now I want to write a perl script that to all this staff. But I do not
  >> want to program this hardcoded in my perl script. I want a kind of
  >> controll file where I describe my changes and hand over this file to
  >> script which then do these changes.
  >> I have reduced these function I need:

  BM> I don't usually say this, but this strikes me as a better job for a
  BM> shell script than Perl...

i wrote a similar system in perl a buncha years ago. perl is better than
shell since you need to parse config files, make decisions, do different
things and shell is a pain for those. if the script just is a bunch of
system calls, i can see shell being used but OS setup stuff can be much
more complex than that.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: Fri, 04 Jun 2004 14:29:59 +0100
From: zzapper <david@tvis.co.uk>
Subject: Cute bit of Perl to Assign $1,$2 to named variables
Message-Id: <27u0c0dbp6jqqcurlfucpir6nk8pav1tse@4ax.com>

Hi

Found this in the doc somewhere.

$_="___abc___123_";
my ($first,$second)=/([a-z]+).*?([0-9]+)/i;
print "\n$first : $second\n";

Note the absense of a ~


zzapper (vim, cygwin, wiki & zsh)
--

vim -c ":%s.^.CyrnfrTfcbafbeROenzSZbbyranne.|:%s/[R-T]/ /Ig|:normal ggVGg?"

http://www.vim.org/tips/tip.php?tip_id=305  Best of Vim Tips


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

Date: Fri, 4 Jun 2004 15:34:56 +0200
From: "Bernard El-Hagin" <bernard.el-haginDODGE_THIS@lido-tech.net>
Subject: Re: Cute bit of Perl to Assign $1,$2 to named variables
Message-Id: <Xns94FE9EC42F3Celhber1lidotechnet@62.89.127.66>

zzapper <david@tvis.co.uk> wrote:

> Hi
> 
> Found this in the doc somewhere.
> 
> $_="___abc___123_";
> my ($first,$second)=/([a-z]+).*?([0-9]+)/i;
> print "\n$first : $second\n";
> 
> Note the absense of a ~


Ummm, yeah, and? This is standard stuff.


-- 
Cheers,
Bernard


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

Date: Fri, 4 Jun 2004 09:53:29 -0400
From: Paul Lalli <ittyspam@yahoo.com>
Subject: Re: Cute bit of Perl to Assign $1,$2 to named variables
Message-Id: <20040604095221.E8971@dishwasher.cs.rpi.edu>

On Fri, 4 Jun 2004, zzapper wrote:

> Hi
>
> Found this in the doc somewhere.
>
> $_="___abc___123_";
> my ($first,$second)=/([a-z]+).*?([0-9]+)/i;
> print "\n$first : $second\n";
>
> Note the absense of a ~

There's nothing cute or unusual about this.  It's standard, well-defined,
and documented code.

Are you asking us to explain to you how it works?

Paul Lalli


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

Date: Fri, 04 Jun 2004 14:56:12 +0100
From: zzapper <david@tvis.co.uk>
Subject: Re: Cute bit of Perl to Assign $1,$2 to named variables
Message-Id: <opv0c05esg0ilmpn9cnqiehi8qnltk79pi@4ax.com>

On Fri, 4 Jun 2004 09:53:29 -0400, wrote:

>On Fri, 4 Jun 2004, zzapper wrote:
>
>> Hi
>>
>> Found this in the doc somewhere.
>>
>> $_="___abc___123_";
>> my ($first,$second)=/([a-z]+).*?([0-9]+)/i;
>> print "\n$first : $second\n";
>>
>> Note the absense of a ~
>
>There's nothing cute or unusual about this.  It's standard, well-defined,
>and documented code.
>
>Are you asking us to explain to you how it works?
>
>Paul Lalli
Paul,
Thanx I'm fine on how it works.
I've been writing Perl since 1994, but the above was new to me!!

zzapper (vim, cygwin, wiki & zsh)
--

vim -c ":%s.^.CyrnfrTfcbafbeROenzSZbbyranne.|:%s/[R-T]/ /Ig|:normal ggVGg?"

http://www.vim.org/tips/tip.php?tip_id=305  Best of Vim Tips


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

Date: Fri, 04 Jun 2004 13:56:49 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Cute bit of Perl to Assign $1,$2 to named variables
Message-Id: <x77junpgtk.fsf@mail.sysarch.com>

>>>>> "z" == zzapper  <david@tvis.co.uk> writes:

  z> Hi
  z> Found this in the doc somewhere.

  z> $_="___abc___123_";
  z> my ($first,$second)=/([a-z]+).*?([0-9]+)/i;
  z> print "\n$first : $second\n";

  z> Note the absense of a ~

that isn't the case at all. it is missing =~ which is a different
matter. that = has NOTHING to do with =~. why don't you try t figure out
what is going on there. it is not a good idea to use code constructs that
you don't understand.

and the direct assignment of grabbed strings is well known and
documented and i wouldn't call it cute. it just something you haven't
seen before.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: Fri, 4 Jun 2004 10:02:48 -0400
From: Paul Lalli <ittyspam@yahoo.com>
Subject: Re: Cute bit of Perl to Assign $1,$2 to named variables
Message-Id: <20040604100031.O8971@dishwasher.cs.rpi.edu>

On Fri, 4 Jun 2004, zzapper wrote:
>
> On Fri, 4 Jun 2004 09:53:29 -0400, wrote:
>
> >On Fri, 4 Jun 2004, zzapper wrote:
> >
> >> Hi
> >>
> >> Found this in the doc somewhere.
> >>
> >> $_="___abc___123_";
> >> my ($first,$second)=/([a-z]+).*?([0-9]+)/i;
> >> print "\n$first : $second\n";
> >>
> >> Note the absense of a ~
> >
> >There's nothing cute or unusual about this.  It's standard, well-defined,
> >and documented code.
> >
> >Are you asking us to explain to you how it works?
>
> Paul,
> Thanx I'm fine on how it works.
> I've been writing Perl since 1994, but the above was new to me!!

You've been writing Perl for 10 years, yet you find the concept of a
pattern match's return value new?  I find that... disconcerting.

Paul Lalli


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

Date: Fri, 04 Jun 2004 14:03:05 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Cute bit of Perl to Assign $1,$2 to named variables
Message-Id: <x71xkvpgiu.fsf@mail.sysarch.com>

>>>>> "z" == zzapper  <david@tvis.co.uk> writes:

  z> On Fri, 4 Jun 2004 09:53:29 -0400, wrote:
  >> On Fri, 4 Jun 2004, zzapper wrote:

  >>> $_="___abc___123_";
  >>> my ($first,$second)=/([a-z]+).*?([0-9]+)/i;
  >>> print "\n$first : $second\n";
  >>> 
  >>> Note the absense of a ~
  >> 
  >> There's nothing cute or unusual about this.  It's standard, well-defined,
  >> and documented code.
  >> 
  >> Are you asking us to explain to you how it works?
  >> 
  >> Paul Lalli

  z> Thanx I'm fine on how it works.
  z> I've been writing Perl since 1994, but the above was new to me!!

i find that hard to believe. list assignment of grabs is so common and
useful. you must not have been reading perlre or perlop then.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: Fri, 04 Jun 2004 15:10:39 +0100
From: zzapper <david@tvis.co.uk>
Subject: Re: Cute bit of Perl to Assign $1,$2 to named variables
Message-Id: <jm01c0195sg795e2e3dedtiv9eu2nuqcup@4ax.com>

On Fri, 04 Jun 2004 13:56:49 GMT, wrote:

>>>>>> "z" == zzapper  <david@tvis.co.uk> writes:
>
>  z> Hi
>  z> Found this in the doc somewhere.
>
>  z> $_="___abc___123_";
>  z> my ($first,$second)=/([a-z]+).*?([0-9]+)/i;
>  z> print "\n$first : $second\n";
>
>  z> Note the absense of a ~
>
>that isn't the case at all. it is missing =~ which is a different
>matter. that = has NOTHING to do with =~. why don't you try t figure out
>what is going on there. it is not a good idea to use code constructs that
>you don't understand.
>
>and the direct assignment of grabbed strings is well known and
>documented and i wouldn't call it cute. it just something you haven't
>seen before.
>
>uri
Hey guys I surrender!!!

zzapper (vim, cygwin, wiki & zsh)
--

vim -c ":%s.^.CyrnfrTfcbafbeROenzSZbbyranne.|:%s/[R-T]/ /Ig|:normal ggVGg?"

http://www.vim.org/tips/tip.php?tip_id=305  Best of Vim Tips


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

Date: 4 Jun 2004 07:50:16 -0700
From: constants@mix-net.net (Mark Constant)
Subject: Delete a line out of a flat file database
Message-Id: <ce43fdea.0406040650.61f36da@posting.google.com>

I have pre-made code that deletes a line from a flat file database. I
am trying to pass an argument through a link to give the name of the
line to delete.

Here is my database.txt 
image020.jpg | 6/4/2004 | 10:19:59 |  | rena

Here is how I use the link 
delete.cgi?filedelete=$filename

Now here is what prints out
image020.jpg
File image020.jpg not found!

It is obvious that it is grabbing the argument because it prints out
image020.jpg. The thing I don't understand is why it is not matching
with the image020.jpg in the database.txt.

Here is my code
#!c:/perl/bin/perl

use strict;
use warnings;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
my $q = new CGI;
print $q->header, $q->start_html('Delete File');

my $action = new CGI;
my @temp=split(/=/,$ENV{'QUERY_STRING'});
my $filedelete = $temp[1];
my $file = 'C:/Program Files/Apache
Group/Apache2/htdocs/quickbooks/database.txt';
my $found = undef;
my (@ary);
my $line;

open( OLD, $file ) or die "Couldn't open old file $file: $! \n";
print $temp[1];
foreach $line (@ary) {
	chomp($line);
	(my $filename, my $filedate, my $filetime, my $notes, my $user) =
split(/\|/,$line);
	push( @ary, $line ) unless ( $filedelete eq $filename );
	$found = 1 if ( $filedelete eq $filename );
}

close OLD or die "Couldn't close old file $file: $! \n";

unless ($found) {
	print $action->h2("File $filedelete not found!");
	exit;
}

open( NEW, ">$file" ) or die "Couldn't open new file $file: $!\n";
foreach (@ary) {
	print NEW $_, "\n" 
}

close NEW or "Couldn't close new file $file: $! \n";;

exit;

print $q->end_html;


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

Date: Fri, 4 Jun 2004 11:03:16 -0400
From: Paul Lalli <ittyspam@yahoo.com>
Subject: Re: Delete a line out of a flat file database
Message-Id: <20040604110041.Y8971@dishwasher.cs.rpi.edu>

On Fri, 4 Jun 2004, Mark Constant wrote:

> Here is my database.txt
> image020.jpg | 6/4/2004 | 10:19:59 |  | rena
>
> Now here is what prints out
> image020.jpg
> File image020.jpg not found!
>
> It is obvious that it is grabbing the argument because it prints out
> image020.jpg. The thing I don't understand is why it is not matching
> with the image020.jpg in the database.txt.
<snip>
> 	(my $filename, my $filedate, my $filetime, my $notes, my $user) =
> split(/\|/,$line);
> 	push( @ary, $line ) unless ( $filedelete eq $filename );
> 	$found = 1 if ( $filedelete eq $filename );

You're splitting on the | only.  But look at your database lines.  The
elements are separated by " | ", not by "|".  So the contents of $filename
are 'images020.jpg ', which is not string equal to 'image20.jpg'

I would suggest changing your split line to
split /\s+\|\s+/, $line;

(untested on my part, btw).

Paul Lalli


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

Date: Fri, 4 Jun 2004 05:19:58 GMT
From: Rocco Caputo <troc@pobox.com>
Subject: HEY, YOU!  POE 0.29 has been released!
Message-Id: <HysCv7.1Kqs@zorch.sf-bay.org>
Keywords: multitasking, networking, framework, components, robust, cool

--------
Rejoice!
--------

Version 0.29 of the POE networking and multitasking framework has been
released.  Thanks go out to everyone who assisted in its development.
This release is improved in several ways.

Scheduled deprecations:

 - Deprecated sample programs have been removed from the distribution.
   See POE's web-based cookbook at http://poe.perl.org/?POE_Cookbook
   for them and more.

 - Completed the XyzState to XyzEvent deprecation schedule.  Wheels
   totally disavow knowledge of /State$/ parameters, which means
   REALLY old programs will silently fail now.  That's okay, though,
   because they were causing noisy warnings and errors for over a
   year.

Performance tuning:

 - Anything that uses call() to invoke event handlers in the same
   session will be 20-40% faster.  This includes the POE::Wheel
   classes, which are used extensively in most POE programs.

Improved Portability:

 - Migrated the IPv6 support to the newer resolver calls.  This should
   fix a runtime error when using IPv6 on Solaris.

 - The documentation for using POE::Preprocessor with PerlApp (and
   Perl2EXE) was clarified and extended.

 - C<use warnings> calls were removed so that POE would once again
   work with really old versions of Perl.  Maintainers of legacy
   systems will rejoice.

 - Various warts with legacy Perl support were smoothed out.  POE
   should once again work as far back as 5.004-ish.

 - The Event.pm event loop bridge wasn't properly terminating
   sometimes.  Now it does so more often.

Installer Improvements:

 - Module::Build is used properly now.

 - META.yml is generated properly.

 - The test reporting framework once again categorizes reports under
   the proper POE version.

New Features:

 - POE::Component::Client::TCP exposes a "connect" callback.

 - The flag that generates the "run() was not called" warning has been
   exposed so it can be explicitly turned off.

 - An experimental options and settings registry is added.  This is
   similar to FreeBSD's sysctls system.  It's not used for much yet,
   but it's planned to include runtime knobs and status accumulators.
   See the documentation for POE::API::Ctl.

Documentation Fixes:

 - Too numerous and subtle to enumerate here.

As if that wasn't enough, POE's web site contains detailed logs for
every public release, ever!

 - http://poe.perl.org/?POE_CHANGES

Even now the latest tarball should be hurtling towards your favorite
CPAN mirror.  It is also on the web, and so is a Windows PPD!  Users
who need advanced notice of changes can follow POE's development in
CVS or discuss new features on the mailing list.

 - http://poe.perl.org/?Where_to_Get_POE
 - http://poe.perl.org/?POE_Support_Resources

Thanks again to everyone who helped with this release.  Keep the
feedback and patches coming.

---------
About POE
---------

POE is a networking and multitasking framework for Perl.  It has been
in active development since 1996.  Its first public release was in
1998.  The O'Reilly Perl Conference (now part of OSCON) named it "Best
New Module" in 1999.

 - http://poe.perl.org/?What_POE_Is

POE's users and developers continue to improve and build upon it.  See
the CPAN for the most up-to-date list of POE based modules.

 - http://search.cpan.org/search?mode=module&query=POE::Component

POE's robustness and performance have made it an integral part of
mission critical applications since its first release.  It is used in
several fields, and in projects ranging from just a few lines of code
to hundreds of thousands.

 - Financial:
   Market servers, clients, billing systems, and automated trading
   agents.

 - Web:
   Commerce servers, content management systems, application servers,
   data warehouses, WAP proxies, ad exchanges, web crawlers/spiders,
   and a variety of specialized agents.

 - System Administration:
   Large-scale host monitors and maintenance agents, distributed load
   testers, a distributed file system (InterMezzo), radius monitors,
   system log managers and reports, SNMP monitors, and spam detectors.

 - Entertainment:
   Interactive TV servers; mp3 jukeboxes and streaming servers; game
   server monitors, managers, and tournament controllers; and a
   plethora of IRC applications, services, and agents (bots).

 - Software Development:
   Compile farm managers, build managers, distributed testing
   frameworks.

 - Monitoring and Automation:
   X10 home control systems, weather station monitors, alarm monitors.

We look forward to hearing how POE has helped you.

-- Rocco Caputo - rcaputo@cpan.org - http://poe.perl.org/




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

Date: 4 Jun 2004 07:24:48 -0700
From: izco@hotmail.com (RP)
Subject: Re: LWP::UserAgent problem - 500 error
Message-Id: <9e7779b4.0406040624.47712f5f@posting.google.com>

"Matt Garrish" <matthew.garrish@sympatico.ca> wrote in message news:<4Mkvc.22195$Hn.798871@news20.bellglobal.com>...
> "RP" <izco@hotmail.com> wrote in message
> news:9e7779b4.0406012228.13463a1b@posting.google.com...
> > "Matt Garrish" <matthew.garrish@sympatico.ca> wrote in message
>  news:<St8vc.94346$tb4.3725677@news20.bellglobal.com>...
> > > "RP" <izco@hotmail.com> wrote in message
> > > news:9e7779b4.0406011336.4d82b45@posting.google.com...
> > > > Hi, I'm trying to get the data off of a number of different pages, and
> > > > I'm getting an error:
> > > >
> > > > 500 Can't connect to www.yahoo.com:80 (connect: Permission denied)
> > > >
> > > > My code is very simple, I'm just trying to get this to work:
> > > >
> > >
> > > Did you try running it from the command line on your computer? Would
>  have
> > > proven it's not a problem in the code and saved you some of the
>  headache.
> > >
> > > The usual guess is that you have to go through a proxy, but you'll have
>  to
> > > ask your host why you can't connect out.
> > >
> > > Matt
> >
> > Yes, I tried running it from the command line, and I still receive the
> > 500 error.  I'll contact my web host and see why I can't connect out -
> > do you have any idea why that might be?  I looked at the Proxy
> > attributes for LWP::UserAgent, and they are a little confusing.
> > Thanks for your help - I'll post what I find from my host.
> 
> I get the yahoo page when I run it. Your host has either configured their
> server not to allow any outbound requests, or as I said in my previous post,
> they have a proxy you should be going through. No one here can help you with
> that, though. If you have a problem running your script once you have the
> details of how to connect out, you can always try back then.
> 
> Matt

Is it normal for a web host to be configured that way?  I've been
considering switching hosts anyway, and this might be the last straw. 
I don't want to switch and then have this problem with my new host -
it's a question I have to ask before I find hosting...  Thanks for all
your help!


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

Date: 4 Jun 2004 04:31:44 -0700
From: slimclity@hotmail.com (SlimClity)
Subject: Net::SSH::(W32)Perl error checking
Message-Id: <3c209c5f.0406040331.49a805b9@posting.google.com>

Hi,

I'm using the Net::SSH::(W32)Perl module to do some stuff on a BSD
machine. But I have some problems with error detection with this
module:

# Load modules
use Net::SSH::W32Perl;W32

# Create new SSH object and login
$ssh = Net::SSH::W32Perl->new($hostname)
        or die "Er is een fout met de hostname, controleer deze...";

Gives:
  Can't connect to 123.123.123.800: Invalid argument (instead of my
error message)

$ssh->login($username, $password)
	or die "Uw gebruikersnaam of wachtwoord is fout...";
Gives:
   Permission denied at ssh_test.pl at line .. (instead of my error
message)

I've tried using: PrintError=>0, but that doesn't help. What could be
wrong?

Thanks for the time/help.


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

Date: 4 Jun 2004 04:45:50 -0700
From: fastidious007@fastmail.fm (arc)
Subject: Novice how to design this script?
Message-Id: <fd80715e.0406040345.574ba01e@posting.google.com>

Hi There,

I an currently tying myself in knots trying to write a perl script 
which will basically get from one file a list of stations and from
another file another list of stations and then to write to third file
the common station names. If the names are different to get the
alternative from a mappings file. The common factor in all of this is
an identifying code which each of the stations has.

I have a very basic understanding of scalars, lists, and hash's.

---
arc


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

Date: Fri, 04 Jun 2004 13:48:17 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Novice how to design this script?
Message-Id: <2ib6b8Fli2keU1@uni-berlin.de>

arc wrote:
> I an currently tying myself in knots trying to write a perl script
> which will basically get from one file a list of stations and from
> another file another list of stations and then to write to third
> file the common station names.

Are you? Then post what you have so far, and somebody will likely help
you correct possible mistakes.

But before posting, please study the posting guidelines for this group:

http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html

to see what you should do before posting. Btw, they also include
advice with respect to the subject line of a post.

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl



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

Date: Fri, 04 Jun 2004 22:42:41 +1000
From: Gregory Toomey <nospam@bigpond.com>
Subject: Re: Novice how to design this script?
Message-Id: <3763409.4OZSjEB05d@GMT-hosting-and-pickle-farming>

arc wrote:

> Hi There,
> 
> I an currently tying myself in knots trying to write a perl script
> which will basically get from one file a list of stations and from
> another file another list of stations and then to write to third file
> the common station names. If the names are different to get the
> alternative from a mappings file. The common factor in all of this is
> an identifying code which each of the stations has.
> 
> I have a very basic understanding of scalars, lists, and hash's.
> 
> ---
> arc



Put each set of station names or codes into a list. Pass the lists to the "intersection" function below.
This returns names/codes common to both.
http://www.gregorytoomey.com/index.php?option=content&task=view&id=9&Itemid=28

gtoomey


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

Date: Fri, 04 Jun 2004 14:23:44 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: opening multiple pipes
Message-Id: <i6q0c0pq5lgi78lspi30lmt8ri4g2lmumg@4ax.com>

On Fri, 04 Jun 2004 03:10:13 GMT, Bob Walton
<invalid-email@rochester.rr.com> wrote:

>> in unix, we can use pipes such as 
>> #ls -ltr |grep "txt" | wc -l 
[snip]
>You don't need open2 or open3 to do a one-directional pipe.  Try [untested]:

Also, I hope that the OP chose that cmd line just as an example, but
maybe it could be worth pointing out that most often calling commands
like that from perl is plainly not the best thing to do.

For example wc -l just counts lines (so btw -ltr are plainly useless -
this is not perl-related, anyway), so supposing that 'ls|' has been
open()ed as $fh, one would just need.

  my $cnt=grep /txt/, <$fh>;

using perl's internal grep() function and scalar context instead.

But then one could directly use perl's own glob()bing facilities as in

  my $cnt=grep /txt/, <*>;

or, much better,

  my $cnt=()=<*txt*>;

For the OP: please note, in case you don't know, that despite the
visual similarity the <> constructs in <$fh> and <*> (and <*txt*>)
respectively really represent two *completely* different operators!

The latter one is a much better approach in shell progamming too,
IMHO: while not really "forbidden" a cmd line like

  # ls -ltr | grep "txt"

is indeed awkward: one would normally use

  # ls -ltr *txt*

also in that context.

Last, I don't think it makes a substantial difference, but just to
prevent others from pointing out so, it must be noted that ls by
default doesn't show files =~ /^\./, so if you *do* want that
behaviour you may use something like

  my $cnt=grep !/^\./, <*txt*>;


Michele
-- 
you'll see that it shouldn't be so. AND, the writting as usuall is
fantastic incompetent. To illustrate, i quote:
- Xah Lee trolling on clpmisc,
  "perl bug File::Basename and Perl's nature"


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

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 6651
***************************************


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