[7339] in Perl-Users-Digest
Perl-Users Digest, Issue: 964 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Sep 2 19:17:21 1997
Date: Tue, 2 Sep 97 16:02:18 -0700
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, 2 Sep 1997 Volume: 8 Number: 964
Today's topics:
Re: NIST Identifier Collaboration Service (Don Libes)
Re: perl and XEmacs (Chris Nandor)
Re: perl/win95/Long File Names <mturk@globalserve.net>
Re: Pushing output in CGI (Matthew Burnham)
Re: Reading a data file (Matthew Burnham)
Re: Reading a data file <rootbeer@teleport.com>
Re: Server Error Help <chris@wzone.com>
Re: Server Error Help <rootbeer@teleport.com>
Re: shell command "more" (M.J.T. Guy)
Re: Shortest Path Algorithm <chris@wzone.com>
Simple Perl for Win 32 Question (not in FAQ) (T. Wheeler)
Re: Simple Perl for Win 32 Question (not in FAQ) (Kevin)
Sybperl - no html after $dbuse lane.mabbett@eds.com
Re: Trouble with DBM files (Rex Fowler)
Re: Velocis Database Server Problems <khera@kciLink.com>
Re: Which version of PERL is running on the server? <khera@kciLink.com>
Who is still interested in SOCKS? (Mark A. Lehmann)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 02 Sep 1997 16:53:54 -0400
From: libes@nist.gov (Don Libes)
Subject: Re: NIST Identifier Collaboration Service
Message-Id: <s6azppvqvx9.fsf@muffin.nist.gov>
In article <hhgc4je0q.fsf@bergen.sn.no> Gisle Aas <aas@bergen.sn.no> writes:
Tom Grydeland <tom@mitra.phys.uit.no> writes:
> http://pitch.nist.gov/nics/
> There is no domain for Perl modules. Seems it could very well be.
We have the module list to coordinate our name space. It seems to work
well.
I agree that the Modules List is a very nice thing. However, there
are things it does poorly. I'm not claiming it should be replaced.
Rather, I'm simply saying that NICS is not nearly as duplicative as it
may at first appear. To the contrary, it complements the Modules List
in some interesting ways.
On the other hand, the need for NICS is much more obvious for domains
that don't have a registry (or had one that didn't work well, was too
expensive, etc) already.
So even if we don't apply NICS to Perl modules, we could still apply
it to other domains of Perl. For instance, there's a common problem
of dealing with collisions due to exported function names. Sure you
can be selective when you use/require and/or carefully qualify
references to function names. However, it's a hassle, particularly
with packages that define many names. I'm not saying we need unique
function names throughout Perl but it sure would be nice for a bunch
of the really big packages that are common to so much Perl code.
Maintaining huge lists such as function names would be too laborious
for a person, but it's ideal for an automated registry. And NICS
doesn't require uniqueness, but it does provide a nice way of
documenting it and raising public awareness of collisions.
Back to what the Modules List doesn't do:
As an example, the Modules List lists many alternatives without saying
which is better or where the trade-offs lay. When choosing among
multiple modules that, according to the List all appear to do the same
thing, there's no easy way of finding out which is best. You can post
to comp.lang.perl.misc and annoy everyone with the same damn question
that's been asked dozens of times. Or you can hope someone has
written some definitive opinion like TC did for CGI - although you
still have to go searching for it. And CPAN doesn't make it possible
for authors to respond to this type of opinion piece. NICS, on the
other hand, provides a model for this. Anyone can attach a note to
any entry and the entry author is immediately informed and can take
appropriate action (perhaps simply rebutting it - or more hopefully
collaborating with the person).
In fact, the most irritating thing about CPAN is that it contains a
lot of opinions that I have no way of expressing disagreement with
(other than postings, which quickly expire). Heck, some of the CPAN
offerings come right out and say "this is one person's biased
opinion". Well, that's not much good if I can't counter it. And if I
write to the author and they just ignore me, well, I feel even worse -
not only hasn't my complaint been registered - I've wasted my time,
too. <Oops, this wasn't supposed to be a tirade on CPAN, sorry.
Really - CPAN is great.>
In many ways, the Modules List is much like a "standard" in the
traditional sense. It is centrally maintained, so you have to have
some "approval" (perhaps from the community) to get something in it,
you have to wait for that approval (even if it's obvious) because it's
a manual service, so things like experimental, prototype, and other
tentive modules are not normally listed. This is rather unfortunate
and I've seen the same wheels reinvented simply because none of the
authors had gotten far enough along to publicize working (or alpha)
code until it was much too late. (Everyone raise your hands.)
Bottom line: don't be too quick to dismiss NICS. Perhaps at a later
time, the Modules List can turn into a more interactive, collaborative
service, but until then, let's try and gain some experience with
things like NICS, a service that was specifically designed for that
purpose.
Don
------------------------------
Date: Tue, 02 Sep 1997 17:17:09 -0400
From: pudge@pobox.com (Chris Nandor)
Subject: Re: perl and XEmacs
Message-Id: <pudge-ya02408000R0209971717090001@news.idt.net>
In article <uowyb5jl52i.fsf@tremere.ecte.uswc.uswest.com>, rjray@uswest.com
wrote:
# Jamie> Actually, I think it does! A good language encourages good
# Jamie> style, readable code, and proper use of tools. A good
# Jamie> language helps build good programmers by making common
# Jamie> operations easy to understand, and uncommon operations
# Jamie> possible.
#
# I disagree. It is not the job of the tool to make the person using it
# proficient. It is the responsibility of the person to develop proficiency
# with the tool. A car cannot make a bad driver good. Buying the finest quality
# paints and brushes will not make a bad artist better. And using a language
# with complete clarity of syntax and no room for ambiguity will not make a
# bad programmer better.
I agree, Randy. But I will take it step further. Language encouragement
is best left to George Orwell's novels. A good language allows the user to
write as damned awful as he pleases. A good language allows people to say
"pshaw" and "ain't" and "Barbara Streisand", no matter how unpleasant the
words may sound. It allows people to use "bad" to mean "good" no matter
how obfuscated the meaning. In fact, it allows meanings to change and
evolve. It is the responsibility of the teachers and users of the language
to act responsibly.
Some so-called scholars have thought up this thing called "natural language
programming" which supposedly makes it easier to write programs. But they
focus on how we talk and write, not on how we think. A good language
focuses on how we think. Sometimes bad does mean good, and we should be
able to easily express that.
I think English is the greatest spoken language ever constructed. Is it
the easiest to understand? Well, it can be. But it can also be the most
difficult. It depends on the context. It doesn't enforce any rigidity,
and allows you to be free in clarity, free in obfuscation, free in your own
thoughts and your own paradigms and your own sub-language. And Perl is
like that.
No, Perl is not always easy to read. Ask me if I care. Because it is
possible to be hard to read, it makes the syntax incredibly powerful. I
argue that Perl's syntax is the most powerful of all the programming
languages, and that is in part BECAUSE it mirrors the way we think and
gives us the power to write crappy code.
--
Chris Nandor pudge@pobox.com http://pudge.net/
%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10 1FF7 7F13 8180 B6B6'])
------------------------------
Date: Tue, 02 Sep 1997 15:36:22 -0400
From: Mike Turk <mturk@globalserve.net>
Subject: Re: perl/win95/Long File Names
Message-Id: <340C6AB6.E14@globalserve.net>
Andrew
My apologies .... I tried it and you're right.... I had made an
assumption I shoud not have...
Mike Turk
------------------------------
Date: Tue, 02 Sep 1997 18:56:39 GMT
From: danew@enterprise.net (Matthew Burnham)
Subject: Re: Pushing output in CGI
Message-Id: <340e3181.23507232@news.enterprise.net>
kchadha@hotmail.com wrote:
>$| = 1;
>
>for ($i=0;$i<5;$i++)
>{
> sleep(5);
> print "wait ";
>}
>
>Now the problem is that it prints all "wait wait wait"
>together instead of waiting 5 secs before each.
>
>Howvever, if I say print "wait <br>", it pushes
>the output every 5 secs.
It looks like your web browser is waiting until it gets <br> before
parsing the text. You might be able to persuade it process it earlier by
doing:
print "wait \n";
not that this should make it start on a newline as it should ignore the
newline unless it's inside <PRE> tags, however, it may solve your
problem. If not try other HTML stuff that doesn't cause any side effects
and see what happens.
--
Matthew Burnham | danew@enterprise.net
Manager, MindWeb | http://www.mindweb.co.uk/
Page me: http://wwp.mirabilis.com/2807531 | 2807531-icq@mindweb.co.uk
Web design and hosting | UKP24/Mb/Year for DIY space
WWW, FTP, CGI scripting, mailing lists, autoresponders and more!
------------------------------
Date: Tue, 02 Sep 1997 18:55:47 GMT
From: danew@enterprise.net (Matthew Burnham)
Subject: Re: Reading a data file
Message-Id: <340e2844.44329500@news.enterprise.net>
"John" <jimison@vision.net.au> wrote:
>I was wondering, how do I read a data file?
>
>Say I have a file called: data.txt and it contains
>
>1101|Book of RA|24.95|IN
>1102|Fnord Hunting|12.95|OUT
>
>How could I read for example, 24.95 in the first line? Or
>1102 in the second line?
open(FILE, 'data.txt');
while(<FILE>) {
($number, $name, $price, $whatever_that_field_is) = split(/|/);
print $number; #etc
}
close(FILE);
>Please reply via mail.
YHM.
--
Matthew Burnham | danew@enterprise.net
Manager, MindWeb | http://www.mindweb.co.uk/
Page me: http://wwp.mirabilis.com/2807531 | 2807531-icq@mindweb.co.uk
Web design and hosting | UKP24/Mb/Year for DIY space
WWW, FTP, CGI scripting, mailing lists, autoresponders and more!
------------------------------
Date: Tue, 2 Sep 1997 15:31:08 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Matthew Burnham <danew@enterprise.net>
Subject: Re: Reading a data file
Message-Id: <Pine.GSO.3.96.970902152955.12071J-100000@julie.teleport.com>
On Tue, 2 Sep 1997, Matthew Burnham wrote:
> >Say I have a file called: data.txt and it contains
> >
> >1101|Book of RA|24.95|IN
> >1102|Fnord Hunting|12.95|OUT
> >
> >How could I read for example, 24.95 in the first line? Or
> >1102 in the second line?
>
> open(FILE, 'data.txt');
Especially in example scripts written to illustrate a point, it's
important to check the return value from open.
> while(<FILE>) {
> ($number, $name, $price, $whatever_that_field_is) = split(/|/);
That won't work. Better luck next time! :-)
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 2 Sep 1997 20:29:15 GMT
From: "Chris Waddell" <chris@wzone.com>
Subject: Re: Server Error Help
Message-Id: <01bcb7de$811e4a80$79d2adce@aptiva>
> I created a simple pearl script called test.cgi (see the source below).
> When I run it from my Unix shell account it runs fine, but when I run
> it through a HTML FORM using
> <form method=POST action="http://myhost.com/~mydir/cgi-bin/test.cgi">
> I get a server error 500 "Internal Server Error The server encountered
> an internal error or misconfiguration and was unable to complete your
request."
>
> But when I check the output file it has the correct data from the html
form.
>
> So the script is working but why do I get an error only when it is posted
> through html?
You're smart to check it under a shell. Personally I miss the shell
account I used to have on my old provider.
> source:
> #!/usr/local/bin/perl
> $buffer = <STDIN>;
> open(NEWFILE,">TEST.TXT") || die $!;
> print NEWFILE "$buffer\n";
> close(NEWFILE);
>
> thanks
> fishrman@wco.com
You cannot accept input through <STDIN> from HTTP. You must use a form or
command line arguments to submit information to a perl script.
(You're also missing the integral [print "Content-type: text/html\n\n";])
You can find a library which will give you easy access to GET, POST, and
Command Line variables at
http://www.bio.cam.ac.uk/cgi-lib/
If you desperately need the script above working, you could try the
following:
#!/usr/local/bin/perl
print "Content-type: text/html\n\n";
$buffer = $ARGV[0];
open(NEWFILE,">TEST.TXT") || die $!;
print NEWFILE "$buffer\n";
close(NEWFILE);
print "File opened successfully and string "$buffer" written.\n";
You would have to specify your "buffer" variable in the command line (your
url). For example, tell your browser to locate the following url in order
to set "buffer" to "Fish"
http://"host and full path name"/test.cgi?Fish
Note that you may not use spaces in an url. If you wish to get more
complicated, I strogly suggest you get and use cgi-lib.pl, located at the
url I mentioned above.
------------------------------
Date: Tue, 2 Sep 1997 15:16:31 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: "Michael A. Watson" <fishrman@shell.wco.com>
Subject: Re: Server Error Help
Message-Id: <Pine.GSO.3.96.970902151545.12071G-100000@julie.teleport.com>
On 2 Sep 1997, Michael A. Watson wrote:
> I created a simple pearl
Heh. :-)
> script called test.cgi (see the source below). When I run it from my
> Unix shell account it runs fine, but when I run it through a HTML FORM
When you're having trouble with a CGI program in Perl, you should first
look at the please-don't-be-offended-by-the-name Idiot's Guide to
solving such problems. It's available on the perl.com web pages. Hope
this helps!
http://www.perl.com/perl/
http://www.perl.com/perl/faq/
http://www.perl.com/perl/faq/idiots-guide.html
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 2 Sep 1997 19:52:42 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: shell command "more"
Message-Id: <5uhqqa$rou$1@lyra.csx.cam.ac.uk>
Aaron Sherman <ajs@lorien.ajs.com> wrote:
>
>I can't belive this is not in the FAQ or a man-page or somewhere, but
>here's the rant that I've ranted on before (shades of MMB):
>
>PAGER PAGER PAGER
>
>Use $ENV{PAGER}
Or better, use the fact that Perl Configure has already done the work:
> my $pager = $ENV{PAGER} || 'more';
my $pager = $ENV{PAGER} ||
(require Config) && $Config::Config{pager} ||
'more';
Mike Guy
------------------------------
Date: 2 Sep 1997 19:50:18 GMT
From: "Chris Waddell" <chris@wzone.com>
Subject: Re: Shortest Path Algorithm
Message-Id: <01bcb7d9$0fcfe3c0$79d2adce@aptiva>
Andy <andyc@dircon.co.uk> wrote in article
<andyc-0109971502040001@aj139.du.pipex.com>...
> In article <5u2qkq$g5v$1@newbabylon.rs.itd.umich.edu>, Matthew Scott
Britt
> <msbritt@ren.us.itd.umich.edu> wrote:
>
> > Does anyone know of a shortest path algorithm written in perl? I
search
> > CPAN with no luck...
>
> The algoithm would depend on whether you want depth-first or
breadth-first
> searching done, I would have thought..
>
easy:
y=((y2-y1)/(x2-x1))x+(y1-x1)((y2-y1)/(x2-x1))
:)
------------------------------
Date: Tue, 02 Sep 1997 21:52:21 GMT
From: twheeler@m-net.arbornet.org (T. Wheeler)
Subject: Simple Perl for Win 32 Question (not in FAQ)
Message-Id: <340c8904.677271315@news.stlnet.com>
I am learning perl and want to know how you could strip just the path
from a command line argument.
For example, using:
perl MYPROG.PL c:\temp\argument1.txt
on the command line would allow @ARGV to tell me the entire argument.
I want to be able to strip away the last part (filename) from the
first part (path) into two scalars. This would let me then do
something to the original file (like change it's file extension) and
save it with a new naem without having to ask where.
Such as:
rename $path\\$filename $path"newfile.txt";
(pardon my syntax)
Any ideas? I haven't seen this in books or on the net.
Please reply to this newsgroup as my mail server is MIA.
------------------------------
Date: 2 Sep 1997 15:23:01 -0700
From: klander@primenet (Kevin)
Subject: Re: Simple Perl for Win 32 Question (not in FAQ)
Message-Id: <340c9037.22357037@news.primenet.com>
On Tue, 02 Sep 1997 21:52:21 GMT, twheeler@m-net.arbornet.org (T.
Wheeler) wrote:
>I am learning perl and want to know how you could strip just the path
>from a command line argument.
>
>For example, using:
>
>perl MYPROG.PL c:\temp\argument1.txt
>
Regular expressions. An example:
$filename = 'c:\blah\dir\junk.txt';
$filename =~ /^(.+\\)(.*)$/; # <-- extracts path and filename into $1
# and $2
$fpath = $1;
$fname = $2;
You can use the same technique to strip off the file extension.
--
Kevin -- klander at primenet dot com (add the .com in email replies)
http://www.primenet.com/~klander
--
------------------------------
Date: Tue, 02 Sep 1997 15:37:47 -0600
From: lane.mabbett@eds.com
Subject: Sybperl - no html after $dbuse
Message-Id: <873231950.14639@dejanews.com>
I know there has to be a simple explanantion why the following is not
happening. I am using Perl 5 on Solaris 2.5.1, performing a simple query
using Sybperl on Sybase System 11. I am able to format HTML in my script
until after I issue the &dbuse command. After that, no HTML is sent to
my browser. Everything works fine, however, when the script is executed
from the command prompt. I am completely stumped. Here is a section of
my script:
#!/bin/perl
print "Content-type: text/html", "\n\n";
print "<html><head><title>Results of your Search</title></head>", "\n";
print "<BODY BGCOLOR=#FFFFFF>", "\n";
print "<p>", "\n";
print "<p>", "\n";
print "<table>", "\n";
print "<tr>";
print "Results of your Search on Zip Code ", "\n";
print "</tr>", "\n";
print "<p>", "\n";
use Sybase::Sybperl
require 'sybperl.pl';
require 'getopts.pl';
require 'ctime.pl';
do Getopts('u:d:t:s:p');
$opt_u = '######' unless $opt_u;
$opt_d = 'test' unless $opt_d;
$opt_t = '%' unless $opt_t;
$opt_s = $ENV{DSQUERY} || "KingKong";
$opt_p = '#####' unless $opt_p;
$dbproc = &dblogin($opt_u, $opt_p, $opt_s);
&dbuse($dbproc, $opt_d);
******no HTML below here will output to browser******
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: 2 Sep 1997 15:28:37 -0500
From: rmfowler@raptor.mtc.ti.com (Rex Fowler)
Subject: Re: Trouble with DBM files
Message-Id: <5uhstl$8va@raptor.mtc.ti.com>
In article <3409727e.2306040@news.digex.net>,
webmaster@vmirror.com <webmaster@vmirror.com> wrote:
>
>No dbm on this machine at try.pl line 2.
>
>Here's all there is in try.pl:
>#! /bin/perl
>dbmopen(%LINES,"./97_08_logdbm", 0666);
>dbmclose(LINES);
>exit;
>
The same thing happened to me but I haven't tracked it down exactly yet.
I'm guessing that when I installed the Solaris version of 5.004, the
SCO version 5.003 became munged. I'm not positive that the dbmopen
failures and the 5.004 install coincide since I don't use the SCO
system that much. It's pretty likely though.
The modules are all located centrally except of course the architecture
dependent stuff.
%INC contains (among other things)
'AnyDBM_File.pm' => '/util/lib/perl5/AnyDBM_File.pm'
'NDBM_File.pm' => '/util/lib/perl5/NDBM_File.pm'
Those 2 files exist and are readable. perl -V gives
Summary of my perl5 (5.0 patchlevel 3 subversion 0) configuration:
Platform:
osname=sco, osver=, archname=i386-sco
uname='dragon dragon 3.2 2 i386 '
hint=previous, useposix=true, d_sigaction=define
Compiler:
cc='cc', optimize='-O', gccversion=
cppflags='-W0 -quiet -DNO_PROTOTYPE -D_NO_PROTO -DNO_EMBED'
ccflags ='-W0 -quiet -U M_XENIX -DNO_PROTOTYPE -D_NO_PROTO -DNO_EMBED'
stdchar='unsigned char', d_stdstdio=define, usevfork=false
voidflags=15, castflags=0, d_casti32=define, d_castneg=define
intsize=4, alignbytes=4, usemymalloc=y, randbits=15
Linker and Libraries:
ld='ld', ldflags =''
libpth=/lib /usr/lib
libs=-ldbm.nfs -lintl -lsocket -lnsl_s -lndbm -lld -lm -lc -lPW -lx
libc=, so=none
Dynamic Linking:
dlsrc=dl_none.xs, dlext=none, d_dlsymun=, ccdlflags=''
cccdlflags='', lddlflags=''
@INC: /util/lib/perl5/i386-sco/5.003 /util/lib/perl5 /util/lib/perl5/site_perl/i386-sco /util/lib/perl5/site_perl .
I will upgrade the SCO Perl to 5.004 but I want to find out what happened first.
>Thanks for the help!
>
>Spike Hernandez
>webmaster@vmirror.com
--
Rex Fowler http://www.mtc.ti.com/~rmfowler
(972)997-2779 mailto:rmfowler@mtc.ti.com
Alpha Pager http://www.mtc.ti.com/cgi-bin/alpha_pager.cgi
TI MSG rfow
------------------------------
Date: 02 Sep 1997 18:01:34 -0400
From: Vivek Khera <khera@kciLink.com>
Subject: Re: Velocis Database Server Problems
Message-Id: <x7en77s7cx.fsf@kci.kciLink.com>
>>>>> "SW" == Steve Wells <steve@prilnari.com> writes:
SW> I'm running Velocis (SQL) on a BSDI machine
SW> and I'm looking for someone who has this
SW> working on their machine to "talk" to.
SW> The documentation for this server and the
SW> PERL interface modules are all for Windoze.
SW> It uses a DLL file to run the extensions
SW> and I haven't seen anything equivalent for
SW> a UNIX machine.
I actually sent Raima a very nice Perl module for thier Velocis
database, but they seem to have gone with their own bizarre Windoze
version. My Velocis module is in the VKHERA directory on your nearby
CPAN.
And as for the BSDI version (assuming your using the Velocis that
ships with BSD/OS 3.0) -- it can only talk to a maximum of two velocis
clients on the same machine. This also assumes you've gotten the
Velocis patch from the ftp.bsdi.com FTP server... the shipped version
doesn't work at all, amazingly enough. The patch also includes more
documentation.
But do yourself a favor and don't use Velocis; use mSQL 2.0
(http://www.hughes.com.au/)
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D. Khera Communications, Inc.
Internet: khera@kciLink.com Rockville, MD +1-301-258-8292
PGP/MIME spoken here http://www.kciLink.com/home/khera/
------------------------------
Date: 02 Sep 1997 18:14:23 -0400
From: Vivek Khera <khera@kciLink.com>
Subject: Re: Which version of PERL is running on the server?
Message-Id: <x7d8mrs6rk.fsf@kci.kciLink.com>
>>>>> "BM" == Bob Maillet <bobm@tiac.net> writes:
BM> How would I go about finding which version of PERL is running on a unix
BM> server?
Run perl, and give it the "-v" argument:
perl -v
and it will tell you.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D. Khera Communications, Inc.
Internet: khera@kciLink.com Rockville, MD +1-301-258-8292
PGP/MIME spoken here http://www.kciLink.com/home/khera/
------------------------------
Date: 02 Sep 1997 16:12:11 -0500
From: mlehmann@prismnet.com (Mark A. Lehmann)
Subject: Who is still interested in SOCKS?
Message-Id: <5bhgc3zahg.fsf@smokey.prismnet.com>
Post here if you want perl to support SOCKS (socks4) in the IO::Socket::Inet
module.
Socks is a firewall methodolody (actually now it is a lot more than that).
Some large corporations setup their site to protect themselves from internet
intruders but also to protect the internet from their own employees. A socks
library typically allows TCP (connection oriented) programs to make
connections to the internet through the firewall. The users program either
has to be coded to do this or he or she can compile perl to use the socks
enabled socket commands. I would like to see this socks support written in a
perl module (either in XS, SWIG, or in perl source code) instead of having it
be compiled in place of the regular modules. I would like
IO::Socket::Inet->new() to have an option to use a socks proxy for the TCP
connection.
By the way, I compiled socks into Perl and found that NET::FTP is unable to
open the data transfer socket even though the control socket works just
fine. Even using a passive mode (which is required due to a socks firewall)
doesn't fix the problem. The problem is in some underlying C socks code that
seems to use the same "C" socket for different perl socket file handles. If
I use IO::Socket::Inet->new() twice in a program, the second socket created
fails with a "socket already in use" message. Deep in the
IO::Socket::Inet->new() method the "main::connect" function returns this
message. I think this would not even be an issue if the code were a module
rather than part of the main perl binary itself.
I'm willing to write the code, but if no one here wants it, I'm not going to
package it up for CPAN.
I would also like some pointers from the IO::Socket developers.
--
Mark Lehmann.
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.misc (and this Digest), send your
article to perl-users@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.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
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 V8 Issue 964
*************************************