[19935] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2130 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Nov 14 11:06:04 2001

Date: Wed, 14 Nov 2001 08:05:12 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <1005753911-v10-i2130@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Wed, 14 Nov 2001     Volume: 10 Number: 2130

Today's topics:
    Re: 'stdin' instead of 'STDIN' (Mark Jason Dominus)
    Re: Accessing NT Network Neighbourhood <flavell@mail.cern.ch>
    Re: Accessing NT Network Neighbourhood <s.i.warhurst@rl.ac.uk>
    Re: Accessing NT Network Neighbourhood <godzilla@stomp.stomp.tokyo>
        ANNOUNCE: Filter::Simple 0.70 (Damian Conway)
        backward compatible? <robert@context.nl>
    Re: CGI links with a single argument <postmaster@127.0.0.1>
    Re: ebcdic, was Re: Unencoding <flavell@mail.cern.ch>
    Re: ebcdic, was Re: Unencoding <mgjv@tradingpost.com.au>
        help with system calls (not a path problem) <kestrel@mit.edu>
    Re: help with system calls (not a path problem) <jessica.bull@broadwing.com>
    Re: help with system calls (not a path problem) <godzilla@stomp.stomp.tokyo>
    Re: IBM AS/400 data queue access <jessica.bull@broadwing.com>
    Re: Memory mgt and GC in perl 5.005_3 (Anno Siegel)
        NB: HTTP headers <juhani.kettunen1@luukku.com>
        Net::IRC Problems <mpinna@unionesarda.it>
    Re: Net::IRC Problems <Tassilo.Parseval@post.rwth-aachen.de>
    Re: Net::IRC Problems (Anno Siegel)
    Re: Net::IRC Problems <mpinna@unionesarda.it>
        Passing captured data to Apache server?? <spam.me@ntlworld.com>
    Re: Passing captured data to Apache server?? <eric@urbanrage.com>
    Re: Perl - MySQL question <lawrence@snspix.com>
        ranged arrays <tsee@gmx.net>
    Re: RegEx problem -- trying to match To: or From: at be <admin@asarian-host.net>
        Returning peer information with IO:Sockets ? <thechile@ntlworld.com>
        socket buffering even with $| set (Maurizio Codogno)
    Re: stacked if statements (Mark Jason Dominus)
    Re: stacked if statements <edgue@web.de>
    Re: using modules in subdirectories with a dash (Mark Jason Dominus)
    Re: Value to hex string conversion nobull@mail.com
        What do I need 2 install 2 run PERL om a web-server <robert@context.nl>
    Re: What do I need 2 install 2 run PERL om a web-server <s.i.warhurst@rl.ac.uk>
    Re: What do I need 2 install 2 run PERL om a web-server <godzilla@stomp.stomp.tokyo>
    Re: Why Perl For Database Handling? <bob@geodev.com>
    Re: WWWBoard alternative?  Images? (J.B. Moreno)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Wed, 14 Nov 2001 13:35:11 GMT
From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: 'stdin' instead of 'STDIN'
Message-Id: <3bf2730d.606b$366@news.op.net>

In article <x78zdajzex.fsf@home.sysarch.com>,
Uri Guttman  <uri@stemsystems.com> wrote:
>so i wouldn't use the lower case versions. 

I thought they were deprecated, but the manual doesn't appear to say they are.

> why they are still supported, i don't know.

Beacuse of backward compatibility.  Getting rid of them might break
old code.  Leaving them in costs nothing. 

-- 
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print


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

Date: Wed, 14 Nov 2001 14:04:28 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Accessing NT Network Neighbourhood
Message-Id: <Pine.LNX.4.30.0111141349360.24772-100000@lxplus023.cern.ch>

On Nov 14, S Warhurst inscribed on the eternal scroll:

> Well, basically what happens is this:
[...]
>    #!c:/perl/bin/perl
>
>    print "Content-type: text/html\n\n";

Then basically you've fallen at the first hurdle for this group, by
failing to ask Perl for its additional help.  You'll need to read that
regularly posted new-users FAQ if you hope to be taken seriously.

However, on this occasion you seem to have "got away with it".

>    if(open(FILE, ">f:/test.txt")){print "yes"; close(FILE);}else{print $!;}

an interesting variation on the usual idea...

> That returns "Permission Denied" when you try to run it.

So you don't have a Perl problem.

> I tried running it from the command line and it worked. So it appears to be
> something to do with CGI not having permissions to write

Indeed.

>  to another server.

This is a writeable file share from somewhere else?  I guess your
subject line is the key here.

> I would have thought the "everyone -
> full control" on the target directory would have allowed that..

Dunno, but it's evidently not a Perl question

> it might be that it's actually Apache that's stopping t

I don't see how you can suppose that an 'open' operation on a file, of
the kind shown above, could possibly involve interference from Apache.

> I wish for once I could write a script that works from beginning to end
> without running up against problems that take hours to fix/workaround <sigh>

It'll all get much easier when you grasp how the parts fit together,
and are able to look in the right place for the answers.  I.e in this
case not to waste further time looking for Perl involvement in a
fairly straightforward file opening call.

It would appear that whatever credentials you're using from your
web server to access this fileshare, they aren't granting you write
permission.  But that's a question about (presumably) Microsoft
Networking, not about Perl.  Good luck.



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

Date: Wed, 14 Nov 2001 15:31:11 -0000
From: "S Warhurst" <s.i.warhurst@rl.ac.uk>
Subject: Re: Accessing NT Network Neighbourhood
Message-Id: <9su2o0$ono@newton.cc.rl.ac.uk>

"Alan J. Flavell" <flavell@mail.cern.ch> wrote in message
news:Pine.LNX.4.30.0111141349360.24772-
> >    #!c:/perl/bin/perl
> >
> >    print "Content-type: text/html\n\n";
>
> Then basically you've fallen at the first hurdle for this group, by
> failing to ask Perl for its additional help.  You'll need to read that
> regularly posted new-users FAQ if you hope to be taken seriously.

Help on what exactly? I have no problems with those two lines in the code. I
tried "use warnings" if that's what you mean but it didn't seem to work in
the CGI context.

> However, on this occasion you seem to have "got away with it".

God, I'm so lucky.

> > That returns "Permission Denied" when you try to run it.
>
> So you don't have a Perl problem.

How am I supposed to know that? Someone on another forum, suggested playing
with CHMOD. So as far as I know, maybe I needed an extra line of Perl in
there before I issued the open command.

It's all very well for people like you, who probably knows alot about Perl,
making assumptions about what others should know, should know to read, or
should know how to troubleshoot, but when you are not an expert at
something, a big part of learning is not just finding out the answers to
your problems but also where to find out the answers to your problems and
how to word the questions to get the right answers! I spent alot of time
surfing through FAQs & webs and trying various things (in fact about a day &
a half's worth of hours, at my employers expense) and if I get desperate I
ask here.
Now, I don't expect answers, and I appreciate anyone who takes the time to
make an attempt to help, but it does irk me somewhat when I see someone
getting snotty with someone else and accusing them of not reading the
FAQ/trying to find out the answer for themselves. This newsgroup doesn't say
"for advanced programmers only" on it, so you are always going to get asked
basic questions, and questions from people who might be ignorant to some
things which you take for granted. What is obvious to you isn't necessarily
obvious to someone else, and anyway, there's nothing to stop you ignoring
the post.

> >  to another server.
>
> This is a writeable file share from somewhere else?  I guess your
> subject line is the key here.

Yeah, BOX1 runs Apache on NT4.
BOX2 is an NT4 file server, which has a share set up on it.
CGI on BOX1 needs to open/write files to BOX2 share.

> > it might be that it's actually Apache that's stopping t
>
> I don't see how you can suppose that an 'open' operation on a file, of
> the kind shown above, could possibly involve interference from Apache.

Someone suggested that, rightly or wrongly, on another newsgroup, so I
mentioned it in case it could actually be true!

> It would appear that whatever credentials you're using from your
> web server to access this fileshare, they aren't granting you write
> permission.  But that's a question about (presumably) Microsoft
> Networking, not about Perl.  Good luck.

Yeah.. I wasn't intending on asking anymore about this matter on this
newsgroup, and have posted to the CGI newsgroup.. at the end of the day,
writing a file to a file server using CGI I would have thought to be a
fairly common task, so anyone writing Perl may well have come across this
issue before.. not, it seems in here though.. or perhaps no-one is taking me
seriously, as you suggest.

Cheers
Spencer




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

Date: Wed, 14 Nov 2001 08:00:34 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Accessing NT Network Neighbourhood
Message-Id: <3BF29522.EB81402F@stomp.stomp.tokyo>

S Warhurst wrote:
 
> How can I access a network drive (NT), in this case - to create a file?
 
> I am trying:
 
>    open(FILE, "\\\\servername\\directory\\file.txt")
 
> I can write to it from the machine the script is running on through Network
> Neighbourhood OK, indicating that the account has teh correct permissions on
> that directory, but the script itself falls over.
 
> Do I have to create an actual share on "directory" for Perl to be able to
> access it? I'd rather not if there's a way round it.
 

A year or more back, a similar question was presented here
to which I responded, I think. I have searched for my
information and link on this with no luck. Now I am not
sure if this topic came about here or in another newsgroup.
It could be I researched this when I moved files between 
machines nearly two years back; my memory is questionable.

The question addressed copying network files from one machine
to another. A problem is encountered doing this because user
permissions are not transferred with those files; permissions
are not a part of the files, being stored independently.

For your cgi script, user permissions are missing leading to
your access denied message.

It would be nice if I could recreate my investigative trail
on this but there is so much data to screen trying to find
what I would like to share.

Run a search engine on transferring network files between
machines and you will eventually find information on this
problem related to how permissions are stored and possible
methods to work around this.

I do recall discovering a method to edit those permissions
to include broader ability to access.

Develop logical search terms related to network file permissions,
moving network files and similar. You will find answers after
looking through a lot of search engine returns.


Godzilla!


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

Date: 14 Nov 2001 12:36:54 GMT
From: damian@cs.monash.edu.au (Damian Conway)
Subject: ANNOUNCE: Filter::Simple 0.70
Message-Id: <9stoh6$1fd$1@towncrier.cc.monash.edu.au>
Keywords: perl, module, release

==============================================================================
                  Release of version 0.70 of Filter::Simple
==============================================================================


NAME
    Filter::Simple - Simplified source filtering

SYNOPSIS
     # in MyFilter.pm:

	 package MyFilter;

	 use Filter::Simple;
	 
	 FILTER { ... };

	 # or just:
	 #
	 # use Filter::Simple sub { ... };


     # in user's code:

	 use MyFilter;

	 # this is filtered

	 no MyFilter;

	 # this is not


DESCRIPTION
    The Filter::Simple module provides a simplified interface to
    Filter::Util::Call; one that is sufficient for most common cases.

AUTHOR
    Damian Conway (damian@conway.org)

COPYRIGHT
    Copyright (c) 2000-2001, Damian Conway. All Rights Reserved.
    This module is free software. It may be used, redistributed
        and/or modified under the same terms as Perl itself.


==============================================================================

CHANGES IN VERSION 0.70


	- Added FILTER_ONLY for fine-grained filtering of code,
	  strings, or regexes

	- Fixed document snafu regarding optional terminators

	- Fixed bug so that FILTER now receives *all* import args
	  (i.e. including the class name in $_[0])

	- Allowed default terminator to allow comments embedded in it
	  (thanks, Christian) and to handle __DATA__ and __END__

	- Fixed handling of __DATA__ and *DATA


==============================================================================

AVAILABILITY

Filter::Simple has been uploaded to the CPAN
and is also available from:

	http://www.csse.monash.edu.au/~damian/CPAN/Filter-Simple.tar.gz

==============================================================================


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

Date: Wed, 14 Nov 2001 16:08:01 +0100
From: "Fringel" <robert@context.nl>
Subject: backward compatible?
Message-Id: <9su1cp$a4i$1@news.hccnet.nl>

People,

Is the new version of Perl 5.6 backward compatible with the script written
for Perl 5.005.
Or are there cases known for wich I have to edit my script in order to run
them in v5.6.

Robert




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

Date: Wed, 14 Nov 2001 13:37:51 +0000
From: Anthony Peacock <postmaster@127.0.0.1>
Subject: Re: CGI links with a single argument
Message-Id: <3BF273AF.FEA59E7B@127.0.0.1>

Steven wrote:
> 
> I was wondering if there is a way to use a link with a single argument like
> 
> <a href="http://www.anywhere.com/cgi-bin/some.cgi?argument">xxx</a>
> 
> without using CGI.pm.
> 
> I have got this working got this working using CGI.pm using ('keywords') but
> I can't find a good way to build tables dynamically with CGI.pm, which is
> what I need to do with my script. The single argument would point to a file,
> my script would open that file and build a table out of what it data it
> finds there.

Why not use CGI.pm to parse the CGI return values, then use something
like HTML::Table to generate your HTML Tables dynamically from the file
contents.

Just because you use CGI.pm to parse requests doesn't mean you _have_ to
use it to generate the return HTML.  I generally don't.


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

Date: Wed, 14 Nov 2001 12:17:28 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: ebcdic, was Re: Unencoding
Message-Id: <Pine.LNX.4.30.0111141202020.17826-100000@lxplus023.cern.ch>

On Nov 14, Uri Guttman inscribed on the eternal scroll:

> i understand your delineation between http and cgi and i know it
> well.

cheers...

> it would be up to the server to do the conversions but would it
> translate (from ascii to ebcdic) the URL encoded args or post data for
> the cgi?

I think the other postings have now elucidated that.

In the URI-encoded string, the three-character sequence %xy, where x
and y are hexadecimal digits, represents the ASCII-based coding of the
desired octet in the URI itself; but the three individual characters,
% , x , and y would, at this point in the protocol (i.e on the EBCDIC
CGI interface between the CGI process and its HTTPD) be expressed in
EBCDIC characters.

Has that made it any clearer, or just added more confusion ?!?

> and what about the headers generated
> by the cgi? just a whole mess of worms there and what about even trying
> to write portable perl cgi across the ebcdic/ascii range?

I think we just need to take our lessons from Lincoln's code  ;-)

Now don't get me started on IBM mainframe Postscript format.  As I
recall it, the Postscript directives were in ASCII and the embedded
data in EBCDIC.  Or maybe it was the other way around, and I sure
don't want to remember.   :-{


-- 
     </P>That's right, we offer <FONT color=#000000 face=arial size=3><B>
                                                 (quoted from a spamvert)



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

Date: Wed, 14 Nov 2001 23:04:34 +1100
From: Martien Verbruggen <mgjv@tradingpost.com.au>
Subject: Re: ebcdic, was Re: Unencoding
Message-Id: <slrn9v4nei.uf3.mgjv@martien.heliotrope.home>

On Wed, 14 Nov 2001 12:17:28 +0100,
	Alan J. Flavell <flavell@mail.cern.ch> wrote:
> On Nov 14, Uri Guttman inscribed on the eternal scroll:
> 
>> i understand your delineation between http and cgi and i know it
>> well.

[snip]

> Now don't get me started on IBM mainframe Postscript format.  As I
> recall it, the Postscript directives were in ASCII and the embedded
> data in EBCDIC.  Or maybe it was the other way around, and I sure
> don't want to remember.   :-{

Hmmmm... If I had known my innocent remark would bring up these
nightmares from the EBCDIC past, I probably would have whispered,
instead of posting it.

Martien
-- 
                                | 
Martien Verbruggen              | For heaven's sake, don't TRY to be
                                | cynical. It's perfectly easy to be
                                | cynical.


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

Date: Wed, 14 Nov 2001 08:46:19 -0500
From: "J" <kestrel@mit.edu>
Subject: help with system calls (not a path problem)
Message-Id: <3bf275ab$0$3963$b45e6eb0@senator-bedfellow.mit.edu>

I can't get any system calls function to work. I always get errors like:
"Can't spawn cmd.exe: No such file or directory at [current perl script
folder]." I'm running ActivePerl v5.6.1 build 628 on Windows 2000. (Note:
scripts without system() or backticks run smoothly -- even those with exec()
commands -- but now I need system calls.)

The problem appears to be that Perl can't find the command shell (cmd.exe),
even though it's sitting in the default location c:\WINNT\system32 (which
*is* in my PATH).

My last hope was ENV{PERL5SHELL}, which the perlwin32 and perlrun manpages
say can be used to control the shell that perl uses to run system() and
backtick commands. However, I set that to
        C:\\WINNT\\system32\\cmd.exe\ /x/c
        (and verified it interpolates to "C:\WINNT\system32\cmd /x/c")
and it still didn't work. Then I found that the perlport manpage goes on to
say that "As an optimization, system(LIST) may not call the command shell
specified in $ENV{PERL5SHELL}." Can this "optimization" be disabled or
circumvented?

Any ideas, anyone? I don't know how this problem arose (maybe an
installation problem I didn't notice till I tried system calls), and I can't
seem to fix it.

Thanks,
-- J




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

Date: Wed, 14 Nov 2001 15:09:44 GMT
From: "Jessica Bull" <jessica.bull@broadwing.com>
Subject: Re: help with system calls (not a path problem)
Message-Id: <YOvI7.152514$7x1.11449104@bin4.nnrp.aus1.giganews.com>

Maybe try to update your ActivePerl to the most recent build?  I run build
629 and do not have any of the problems you list.  (I also use the same OS)
I believe the latest build is 630.  I am not sure this will fix your problem
(which is strange) but it may be worth a shot.




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

Date: Wed, 14 Nov 2001 07:25:11 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: help with system calls (not a path problem)
Message-Id: <3BF28CD7.2BBC1877@stomp.stomp.tokyo>

J wrote:
 
(snipped)
 
> The problem appears to be that Perl can't find the command shell (cmd.exe),
> even though it's sitting in the default location c:\WINNT\system32 (which
> *is* in my PATH).
 
> My last hope was ENV{PERL5SHELL}, which the perlwin32 and perlrun manpages
> say can be used to control the shell that perl uses to run system() and
> backtick commands. However, I set that to

>    C:\\WINNT\\system32\\cmd.exe\ /x/c

>    (and verified it interpolates to "C:\WINNT\system32\cmd /x/c")

> and it still didn't work.
 
> Any ideas, anyone?


http://aspn.activestate.com/ASPN/Mail/Message/perl-win32-porters/681576


Godzilla!


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

Date: Wed, 14 Nov 2001 15:14:46 GMT
From: "Jessica Bull" <jessica.bull@broadwing.com>
Subject: Re: IBM AS/400 data queue access
Message-Id: <GTvI7.16586$jp.1177998@bin2.nnrp.aus1.giganews.com>

There are several ways to access data with in the AS/400.  I don't know what
you mean by data queues though.  Can you elaborate?

"David Fosdike" <dfosdike@nospam.elders.com.au> wrote in message
news:m5nI7.32$5c2.1560@nsw.nnrp.telstra.net...
> Anyone know of  any scripts or modules to access AS/400 data queues from
> either  MS, Unix or Linux platform?
>
> Thanx in advance,
>
> David Fosdike
> dfosdike@nospam.elders.com.au
>
>
>




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

Date: 14 Nov 2001 14:00:22 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Memory mgt and GC in perl 5.005_3
Message-Id: <9sttdm$nde$1@mamenchi.zrz.TU-Berlin.DE>

According to Logan Shaw <logan@cs.utexas.edu>:
> In article <9sru20$1af3$1@agate.berkeley.edu>,
> Arvin Portlock <temp133@hotmail.com> wrote:
> >My question is how do I clean up the previous tree? I would simply undef
> >the root node but each node has a reference to its parent as well as
> >references to its siblings and its children.  I assume perl's GC relies on
> >reference counting and since each node may have two references pointing
> >to it, nothing will get cleaned up.
> 
> Almost.  It's not because the nodes have two references[1].  It's
> because there is a cycle.  (Your "tree" is not technically a tree.
> It's a directed graph with cycles.)
> 
> The minimum you have to do to get Perl's garbage collector to clean up
> any data structure is to remove external references to it (through
> other data structures and through variable names bound to something in
> it) and break all cycles within it.  In your case, the easiest way to
> do this is to break the link from each child to its parent.  Then
> you'll have a true tree, and when you break the link to the root, the
> rest of it will fall like dominoes.
> 
> There's some documentation on garbage collection in Perl available via
> "perldoc perlobj" if you want it.  It's under a heading called
> "Two-Phased Garbage Collection".

There is also the (experimental) WeakRef module available on CPAN.
It allows you to "weaken" a reference to the effect that it is not
counted, as far as garbage collection is concerned.  A piece of data
is reclaimed once its last non-weak reference goes away.

If a data structure is regular enough to know when you close a cycle
you can weaken the cycle-generating references when you create them
and not worry about cycles anymore.  In your case, weakening the upward
links (from child to parent) should do.

Anno


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

Date: Wed, 14 Nov 2001 11:44:32 GMT
From: juhani kettunen <juhani.kettunen1@luukku.com>
Subject: NB: HTTP headers
Message-Id: <3BF25944.5D44F2CA@luukku.com>

Hiyas,

I'm new to Perl and pretty much have just copy+paste/modified things I
have needed so far.

Now I need to send XML-RPC format page to a front-end with a specific
header. What I don't know, and haven't find confirmation is can I send
whatever format header, or can I only use the existing headers?

would this work, as connection isn't one of normal header fields?

$req->header(
  'Connection' => 'keep-alive',
  'Content-type' => 'text/html',
  'Content-length' => '181'
);

and in another case I would have to send only a header to a frontend
that would further use the info from headers to store database
information (JDBC). How would this be done, would the below work?

$req = HTTP::Request->new(GET => 'http://someURL/AddOrder');
  $req->header(
     'SENDER' => $sender,
     'RECEIVER' => $receiver,
     'DATE' => $date,
     'TIME' => $time,
     'PRERECORDED' => $prerecorded,
     'MSGFILE' => $msgfile
);
  $res = $ua->request($req);

Thank you in advance,
Juhani Kettunen



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

Date: Wed, 14 Nov 2001 13:16:21 +0100
From: "Marco Pinna" <mpinna@unionesarda.it>
Subject: Net::IRC Problems
Message-Id: <9stmhd$d4r$1@fe1.cs.interbusiness.it>

Hi I'm Marco Pinna
I've installed Net::IRC Module with CPAN on perl 5.6.1 under linux.
When I try to launch the irctest script  i see this output:

Creating connection to IRC server...
Can't connect to irc.concentric.net:6667! at
/usr/local/lib/perl5/site_perl/5.6.1/Net/IRC.pm lin
e 192
irctest: Can't connect to IRC server.

what it's mean?

I need some other module? I must reconfigure something?
I don't find regard documentation

Thanks and sorry for my bad English.
Marco Pinna





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

Date: Wed, 14 Nov 2001 14:06:24 +0100
From: "Tassilo v. Parseval" <Tassilo.Parseval@post.rwth-aachen.de>
Subject: Re: Net::IRC Problems
Message-Id: <9stq8g$iks$04$1@news.t-online.com>

On Wed, 14 Nov 2001 13:16:21 +0100, Marco Pinna wrote:

> I've installed Net::IRC Module with CPAN on perl 5.6.1 under linux.
> When I try to launch the irctest script  i see this output:
> 
> Creating connection to IRC server...
> Can't connect to irc.concentric.net:6667! at
> /usr/local/lib/perl5/site_perl/5.6.1/Net/IRC.pm lin
> e 192
> irctest: Can't connect to IRC server.
> 
> what it's mean?

Well, see:

ethan@ethan:~$ BitchX irc.concentric.net Ethan

and then:

-:- BitchX: Auto Response is set to - Ethan
-:- Connecting to port 6667 of server irc.concentric.net [refnum 0]
-:- BitchX: Servers exhausted. Restarting. [1]

It looks that the server just cannot be reached. This would then mean
that there is nothing wrong with the script or your installation of
Net::IRC. There server is simply not reachable.

> I need some other module? I must reconfigure something?
> I don't find regard documentation

No, just find an irc-server that is up and running. Try eu.undernet.org
or so. 

Tassilo
-- 
Beware of self-styled experts: an ex is a has-been, and a spurt is a
drip under pressure.


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

Date: 14 Nov 2001 13:14:52 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Net::IRC Problems
Message-Id: <9stqoc$lei$1@mamenchi.zrz.TU-Berlin.DE>

According to Marco Pinna <mpinna@unionesarda.it>:
> Hi I'm Marco Pinna
> I've installed Net::IRC Module with CPAN on perl 5.6.1 under linux.
> When I try to launch the irctest script  i see this output:
> 
> Creating connection to IRC server...
> Can't connect to irc.concentric.net:6667! at
> /usr/local/lib/perl5/site_perl/5.6.1/Net/IRC.pm lin
> e 192
> irctest: Can't connect to IRC server.
> 
> what it's mean?
> 
> I need some other module? I must reconfigure something?
> I don't find regard documentation

Replace "irc.concentric.net:6667" with an IRC server:port you know you
can connect to.  Only if the error persists you have a problem with
Net::IRC.

Anno


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

Date: Wed, 14 Nov 2001 16:18:59 +0100
From: "Marco Pinna" <mpinna@unionesarda.it>
Subject: Re: Net::IRC Problems
Message-Id: <9su0vt$p3o$1@fe2.cs.interbusiness.it>

----- Original Message -----
From: "Anno Siegel" <anno4000@lublin.zrz.tu-berlin.de>
Subject: Re: Net::IRC Problems


> According to Marco Pinna <mpinna@unionesarda.it>:
> > Hi I'm Marco Pinna
> > I've installed Net::IRC Module with CPAN on perl 5.6.1 under linux.
> > When I try to launch the irctest script  i see this output:
> >
> > Creating connection to IRC server...
> > Can't connect to irc.concentric.net:6667! at
> > /usr/local/lib/perl5/site_perl/5.6.1/Net/IRC.pm lin
> > e 192
> > irctest: Can't connect to IRC server.
> >
>
> Replace "irc.concentric.net:6667" with an IRC server:port you know you
> can connect to.  Only if the error persists you have a problem with
> Net::IRC.
>
I have replaced server and port to use one server that I know but nothing to
do.
In addiction on another PC  with windows 98 and ActivePerl it's work fine.

Marco




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

Date: Wed, 14 Nov 2001 11:16:18 -0000
From: "Josh" <spam.me@ntlworld.com>
Subject: Passing captured data to Apache server??
Message-Id: <7qsI7.1486$n55.163313@news11-gui.server.ntli.net>

Hi,

I am wanting to capture all data coming into a network card by using a
socket that will listen to traffic on port 80.

I have two apache servers and I want the program to then pass this captured
request onto a random apache server.

I can setup up the socket to listen for the traffic but I have no idea how I
can then forward this packet onto the IP address of the apache server.

Can anyone help me out here or point me to some code examples that do this.

Thanks,
Josh




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

Date: Wed, 14 Nov 2001 07:37:26 -0600
From: eric <eric@urbanrage.com>
Subject: Re: Passing captured data to Apache server??
Message-Id: <3BF27396.38E54E39@urbanrage.com>

Josh wrote:
> 
> Hi,
> 
> I am wanting to capture all data coming into a network card by using a
> socket that will listen to traffic on port 80.
> 
> I have two apache servers and I want the program to then pass this captured
> request onto a random apache server.
> 
> I can setup up the socket to listen for the traffic but I have no idea how I
> can then forward this packet onto the IP address of the apache server.
> 
> Can anyone help me out here or point me to some code examples that do this.
> 
> Thanks,
> Josh

using squid would probably be the easiest

Eric


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

Date: Wed, 14 Nov 2001 12:35:54 +0000
From: Lawrence Tierney <lawrence@snspix.com>
Subject: Re: Perl - MySQL question
Message-Id: <B81815AA.4D81%lawrence@snspix.com>

in article 9srpv0$tji$1@rivage.news.be.easynet.net, echnathon at
echnathonh@yahoo.com wrote on 13/11/01 6:55 pm:

> I need suggestions: I would like subscribers to my mailinglist (written in
> Perl) to end up in a MySQL database, for administrative purposes.
> 
> What would be a good place to start ? I suppose modifying the
> user-subscription script ?
> 
> All tips welcomed ! Thanks !
> 
> Echnathon
> 
> 
Without wanting to sound cheeky... I would read Perl and mySQL for the Web
by Paul Dubois. I found it a very useful book.



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

Date: Wed, 14 Nov 2001 16:12:22 +0100
From: "Steffen Müller" <tsee@gmx.net>
Subject: ranged arrays
Message-Id: <9su1ms$c5u$00$1@news.t-online.com>

Hi,
    I know fixed range arrays (eg. arrays that are only valid between -5 and
50) don't exist in Perl. That's why I tried to cook up some hack using tie.
In TIEARRAY, I used the following little hack to create an array that can
hold $upper_limit-$lower_limit scalars.

$#{$self->{ARRAY}} = $self->{UPPER} - $self->{LOWER};

    This and most of the rest work fine, but there's something that makes
the whole attempt futile: Instead of passing negative index values to the
appropriate methods, perl translates them to non-negatives the way we're
used to with arrays starting at 0 by using FETCHSIZE.
    If perl passed the negative index values to the custom methods, I could
map them to the upper range of the array myself so that I could test for
indices to be within $lower_limit < $index < $upper_limit instead of
$lower_limit < $index < $#{$self->{ARRAY}}!
Does anybody have a workaround for this?

(Almost) any input approciated.

Steffen
--
$_=q;0cb212c210b0bb010c0113bb0c410c0b516c0bb3d212c2b0b0b016b6cb2b2c21010c0
b41110b3bba0e0c0d2c4b2b6bc013d2c0d0b01012b0b0;;s/\n//g;s/(\d)/$1<2?$1:'0'x
$1/ge;s/([a-f])/'1'x(ord($1)-97)/ge;print"\n";$o=$_;push@o,substr($o,$_*8,
8)for(0..24);for(@o){print"\0"x(26-$i).chr(oct('0b'.($_)))."\n";$i++}#st_m





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

Date: Wed, 14 Nov 2001 15:52:10 GMT
From: "Mark" <admin@asarian-host.net>
Subject: Re: RegEx problem -- trying to match To: or From: at beginning of line
Message-Id: <KqwI7.54679$Wa.3726504@bin1.nnrp.aus1.giganews.com>

"Anno Siegel" <anno4000@lublin.zrz.tu-berlin.de> wrote in message
news:9sthio$9jq$1@mamenchi.zrz.TU-Berlin.DE...

> According to Mark <admin@asarian-host.net>:

> > /^(To|From):/i
>
> You have said this twice, explaining correctly why the caret must be
> where it is. However, you haven't explained why you propose the /i
> modifier. It shouldn't be there, IMHO.


According to RFC822 (STANDARD FOR THE FORMAT OF ARPA INTERNET TEXT
MESSAGES), "A field-name consists of one or more printable characters
(excluding colon, space, and control-characters). A field-name MUST be
contained on one line. Upper and lower case are not distinguished when
comparing field-names." I further quote, "When matching any other syntactic
unit, case is to be ignored. For example, the field-names 'From', 'FROM',
'from', and even 'FroM' are semantically equal and should all be treated
identically."

Hence, the /i modifier.

- Mark

        System Administrator Asarian-host.org

---
"If you were supposed to understand it,
we wouldn't call it code." - FedEx




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

Date: Wed, 14 Nov 2001 15:38:28 -0000
From: "Scott" <thechile@ntlworld.com>
Subject: Returning peer information with IO:Sockets ?
Message-Id: <VfwI7.2186$n55.291563@news11-gui.server.ntli.net>

Hi,

Does anyone know if its possible to return peer info using IO:sockets. I
know that if you just use UNIX sockets you can call getpeername and
sockaddre_in etc.. to get the client ip and port number but i can't find any
info on this with the perl module??

Thanks,
Scott





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

Date: 14 Nov 2001 16:37:25 +0100
From: mau@beatles.cselt.it (Maurizio Codogno)
Subject: socket buffering even with $| set
Message-Id: <9su33l$ei8@beatles.cselt.it>

I am playing with sockets, but I still cannot unbuffer the output. I read
about the autoflush parameter, but it seems that it's doing nothing at all.

Here there is the snippet of code:

=-=-=-=-=
#!/bin/perl

use IO::Socket;

my $server_port = 31416;

$server = IO::Socket::INET->new(LocalPort => $server_port,
                                Type      => SOCK_STREAM,
                                Reuse     => 1,
                                Listen    => 10 )   # or SOMAXCONN
    or die "Couldn't be a tcp server on port $server_port : $@\n";

# output is sent right away!
select ((select($server), $|=1)[0]);

while ($client = $server->accept()) {
    # $client is the new connection
print <$client>;
}

close($server);
=-=-=-=-=
I tried also to put the select in the while loop (of course, using $client,
since it is the filehandle), but still with no result.

Any suggestion?

ciao, .mau.
-- 
Tra poco / Coming soon: http://xmau.com/


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

Date: Wed, 14 Nov 2001 13:30:37 GMT
From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: stacked if statements
Message-Id: <3bf271fd.604c$38f@news.op.net>

In article <slrn9v3t23.6ia.mgjv@verbruggen.comdyn.com.au>,
Martien Verbruggen  <mgjv@tradingpost.com.au> wrote:
>These ones get interpreted at run time:
>
>  $foo =~ 'pattern';

<ilya>
It does not.

Hope this helps,
</ilya>

-- 
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print


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

Date: Wed, 14 Nov 2001 15:50:56 +0100
From: Edwin =?iso-8859-1?Q?G=FCnthner?= <edgue@web.de>
Subject: Re: stacked if statements
Message-Id: <3BF284D0.BD29DCD8@web.de>



Uri Guttman wrote:

> you will only get a ticket (hmm, would a -w warning be enough?) this
> time. next time, a sentence to code in java for 2 years.

I am coding in Java for years now. Never thought that to be a sentence.
;-)


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

Date: Wed, 14 Nov 2001 13:27:25 GMT
From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: using modules in subdirectories with a dash
Message-Id: <3bf2713d.6033$364@news.op.net>

In article <3BF1F9CB.F1D13948@earthlink.net>,
Benjamin Goldberg  <goldbb2@earthlink.net> wrote:
>Lee Rossey wrote:
>[snip]
>
>BEGIN: {
>    require UNIVERSAL::require;
>    require UNIVERSAL::import;
>    "me::exploits::CVE-2000-1131_GCI_Guestbook::gbook"->require;
>    "me::exploits::CVE-2000-1131_GCI_Guestbook::gbook"->import;
>}
>
>Don't leave out the quotes, or it won't work.

It doesn't work anyway.  Even omitting the spurious : after BEGIN, I
get 'Can't locate UNIVERSAL/require.pm in @INC'.
-- 
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print


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

Date: 14 Nov 2001 11:09:19 +0000
From: nobull@mail.com
Subject: Re: Value to hex string conversion
Message-Id: <u98zd9licg.fsf@wcl-l.bham.ac.uk>

"Marek Wojcik" <marekw@altavista.net> writes:

>     Does anybody know how to solve this problem in an easy way?

The number -> hex convertion is trivial but the _problem_ is less easy
to solve.

The problem here is that you could not locate the answer in the
manuals without prior knowledge of the answer.  This is probably
because the documentation of the hex() function (unlike the oct()
function) fails to mention sprintf().

I trust that you did get as far as finding the hex() function before
you posted here.  If not then the problem is in you and there is
little anyone else can do to solve it.

Anyhow, assuming the problem was the ommission in 'perldoc -f hex',
here's a patch for you to submit to perlbug. HTH.

--- perl-5.7.2/pod/perlfunc.pod	Wed Jul 11 02:29:25 2001
+++ perlfunc.pod	Wed Nov 14 10:57:25 2001
@@ -2119,6 +2119,9 @@
 Hex strings may only represent integers.  Strings that would cause
 integer overflow trigger a warning.
 
+To go the other way (produce a number in hexadecimal), use L</sprintf>
+or L</printf>.
+
 =item import

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Wed, 14 Nov 2001 16:04:48 +0100
From: "Fringel" <robert@context.nl>
Subject: What do I need 2 install 2 run PERL om a web-server
Message-Id: <9su16o$a24$1@news.hccnet.nl>

People,

Can somebody tell me what to install on a Win2k machine to run various
scripts.
The meaning is to host many busy websites wich ask a lot of script-working
back to the visitors. This have to be done in a way that does not consume
all the CPU. I was told that running Perl in a process would be the solution
for this.

What do I need to install and how do I have to configure and call Perl when
opening and editing a website.

Robert




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

Date: Wed, 14 Nov 2001 15:40:54 -0000
From: "S Warhurst" <s.i.warhurst@rl.ac.uk>
Subject: Re: What do I need 2 install 2 run PERL om a web-server
Message-Id: <9su3a7$jlg@newton.cc.rl.ac.uk>

"Fringel" <robert@context.nl> wrote in message
news:9su16o$a24$1@news.hccnet.nl...
> People,
>
> Can somebody tell me what to install on a Win2k machine to run various
> scripts.

I use Apache & ActiveState Perl on one of my win2k servers.

> The meaning is to host many busy websites wich ask a lot of script-working
> back to the visitors. This have to be done in a way that does not consume
> all the CPU. I was told that running Perl in a process would be the
solution
> for this.

I saw an article earlier on irt.org that might be useful on this matter:
http://tech.irt.org/articles/js172/index.htm

> What do I need to install and how do I have to configure and call Perl
when
> opening and editing a website.

How do you mean? "action" on the <form> element?

Spencer




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

Date: Wed, 14 Nov 2001 07:43:11 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: What do I need 2 install 2 run PERL om a web-server
Message-Id: <3BF2910F.8B1B02B4@stomp.stomp.tokyo>

Fringel wrote:

(snipped)
 
> Can somebody tell me what to install on a Win2k machine to run various
> scripts.
 
> What do I need to install and how do I have to configure and call Perl when
> opening and editing a website.


Indigo Perl is an excellent program bundle which includes
an Apache webserver along with numerous other excellent
features. This program package is free and is infinitely 
superior to all program packages including Active State.

This is a package which is extremely easy to install
requiring only one click installation for almost all
uses you may require. This one is perfect for beginners.

http://www.indigostar.com/indigoperl.htm


You will benefit greatly by reading all instructions
and guidelines after installation as is the case with
all projects.


Godzilla!


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

Date: Wed, 14 Nov 2001 09:45:13 -0600
From: Bob Starr <bob@geodev.com>
Subject: Re: Why Perl For Database Handling?
Message-Id: <3BF29189.DFC15758@geodev.com>

Matthew Persico wrote:

> 
> 2) Why has your boss specified not only the problem, but also the
> solution? There must be a reason, good or bad.
>
 
Maybe her boss simply wants her to learn Perl?
That isn't a bad thing, IMHO.


--
Robert Starr
Geophysical Development Corp  Email 
bob@geodev.com
One Riverway, Suite 2100      Phone  713-782-1234
Houston, TX  77056            FAX    713-782-1829


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

Date: Wed, 14 Nov 2001 09:10:33 -0500
From: planb@newsreaders.com (J.B. Moreno)
Subject: Re: WWWBoard alternative?  Images?
Message-Id: <1f2u7l6.1e6er5y1msho51N%planb@newsreaders.com>

Jay S. <hawk_214@mailandnews.com> wrote:

> I have a WWWBoard running OK, but I would like users to be able to
> post images within messages.  I know I can now post a URL, but I would
> rather be able to put the image directly into the message.

Does it support NNTP?  If so, one word: Xfaces.

-- 
JBM
"Your depression will be added to my own" --  Marvin of Borg


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

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.  

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


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