[19383] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1578 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Aug 21 14:05:37 2001

Date: Tue, 21 Aug 2001 11: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)
Message-Id: <998417110-v10-i1578@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Tue, 21 Aug 2001     Volume: 10 Number: 1578

Today's topics:
        are perl-arrays real arrays (Joachim Ziegler)
    Re: are perl-arrays real arrays <ilya@martynov.org>
    Re: are perl-arrays real arrays (Tassilo v. Parseval)
    Re: are perl-arrays real arrays <rlehy@laas.fr>
    Re: fork() does not work <Tassilo.Parseval@post.rwth-aachen.de>
    Re: fork() does not work <philippe.perrin@sxb.bsf.alcatel.fr>
    Re: Forwarding To A Page Dependant on User Choice In A  <Tassilo.Parseval@post.rwth-aachen.de>
    Re: Forwarding To A Page Dependant on User Choice In A  (Eric Bohlman)
    Re: Forwarding To A Page Dependant on User Choice In A  <godzilla@stomp.stomp.tokyo>
    Re: get html files with perl script BUT using a proxy! <mbudash@sonic.net>
    Re: Good old regexp teaser <cberry@cinenet.net>
    Re: How do I sort a 2D-array by three different columns <jurgenex@hotmail.com>
    Re: HTTP::Request::Common file upload <gisle@ActiveState.com>
        Index for input line array? <ddr@rac1.wam.umd.edu>
    Re: Index for input line array? <ren@tivoli.com>
        Microsoft Perl (Phil Hibbs)
    Re: Microsoft Perl (Malcolm Dew-Jones)
        Net::NNTP <bigusAT@btinternetDOT.com>
    Re: New Books on Web Site Design <tsee@gmx.net>
    Re: new modules - looking for (sort-of-)pre-release inp <seanq@darwin.bu.edu>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 21 Aug 2001 09:35:28 -0700
From: ziegler@algorilla.de (Joachim Ziegler)
Subject: are perl-arrays real arrays
Message-Id: <93aad7d0.0108210835.64a4a03@posting.google.com>

hi,

i can't find an answer to this in the FAQ nor in any perl-book I own:

what is the internal representation of perl-arrays? are they implemented by
succesive chunks of bytes in main menmory, each chunk for one array element?

or are they some sort of hashes, internally?

how is the dynamical growing achieved? by doubling the corrsponding C-array?

maybe you can help me,

greetings from germany

joachim


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

Date: 21 Aug 2001 20:41:16 +0400
From: Ilya Martynov <ilya@martynov.org>
Subject: Re: are perl-arrays real arrays
Message-Id: <87zo8tnz6b.fsf@abra.ru>


JZ> hi,
JZ> i can't find an answer to this in the FAQ nor in any perl-book I
JZ> own:

JZ> what is the internal representation of perl-arrays? are they
JZ> implemented by succesive chunks of bytes in main menmory, each
JZ> chunk for one array element?

JZ> or are they some sort of hashes, internally?

JZ> how is the dynamical growing achieved? by doubling the
JZ> corrsponding C-array?

JZ> maybe you can help me,

Not sure but maybe 'perldoc perlguts' can help you.

-- 
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
| Ilya Martynov (http://martynov.org/)                                    |
| GnuPG 1024D/323BDEE6 D7F7 561E 4C1D 8A15 8E80  E4AE BE1A 53EB 323B DEE6 |
| AGAVA Software Company (http://www.agava.com/)                          |
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


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

Date: 21 Aug 2001 16:55:23 GMT
From: Tassilo.Parseval@post.rwth-aachen.de (Tassilo v. Parseval)
Subject: Re: are perl-arrays real arrays
Message-Id: <9lu3pr$e5l$1@nets3.rz.RWTH-Aachen.DE>

On 21 Aug 2001 20:41:16 +0400, Ilya Martynov <ilya@martynov.org> wrote:
> 
> JZ> hi,
> JZ> i can't find an answer to this in the FAQ nor in any perl-book I
> JZ> own:
> 
> JZ> what is the internal representation of perl-arrays? are they
> JZ> implemented by succesive chunks of bytes in main menmory, each
> JZ> chunk for one array element?
> 
> JZ> or are they some sort of hashes, internally?
> 
> JZ> how is the dynamical growing achieved? by doubling the
> JZ> corrsponding C-array?
> 
> JZ> maybe you can help me,
> 
> Not sure but maybe 'perldoc perlguts' can help you.

Or perhaps even a (careful) look into CORE/av.h. ;-)

struct xpvav {
	char*   xav_array;      /* pointer to first array element */
	SSize_t xav_fill;       /* Index of last element present */
	SSize_t xav_max;        /* max index for which array has space */
	IV      xof_off;    	/* ptr is incremented by offset */
	NV      xnv_nv;     	/* numeric value, if any */
	MAGIC*  xmg_magic;  	/* magic for scalar array */
	HV*     xmg_stash;  	/* class package */

	SV**    xav_alloc;  	/* pointer to malloced string */
	SV*     xav_arylen;
	U8      xav_flags;
};

This wont tell you anything about how memory is allocated if one push()s
or unshift()s onto the array, but it gets one a feeling for the
complexity of the Perl-datatypes. hv.h is the equivalent for hashes and
sv.h for scalar variables.

Tassilo
-- 
$a=[(74,116)];$b=[($a->[1]-1,$a->[1]++,0x20)];$c=[(97,110)];$d=[($c->
[1]+1,$b->[1],"her")];for(@{[$a,$b,$c,$d]}){for(@{$_}){$_=~/\d+/?print
(chr($_)):print;}}$c=sub{$l=shift;[(0x20+$l-1,0x50,0x65,0x73-0x01,108
),(0x20,0x68,0x61,)]};print(map{chr($_)}@{($c->(1))});$h={a=>33*3,b=>
10**2+7,c=>"1"."0"."1",d=>0162};@h=sort(keys(%$h));for(@h){print(chr(
ord(chr($h->{$_}))))};



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

Date: Tue, 21 Aug 2001 19:02:38 +0200
From: Ronan Le Hy <rlehy@laas.fr>
Subject: Re: are perl-arrays real arrays
Message-Id: <Pine.GSO.4.33.0108211858480.27517-100000@chimay>


On 21 Aug 2001, Joachim Ziegler wrote:
> what is the internal representation of perl-arrays? are they implemented by
> succesive chunks of bytes in main menmory, each chunk for one array element?

I suggest reading the excellent "Shift, Pop, Unshift and Push with
Impunity!" as an introduction to this subject:
http://www.perlmonks.org/index.pl?node_id=17890

Blop!



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

Date: Tue, 21 Aug 2001 17:13:53 +0200
From: Tassilo von Parseval <Tassilo.Parseval@post.rwth-aachen.de>
Subject: Re: fork() does not work
Message-Id: <3B827AB1.1000608@post.rwth-aachen.de>

Th. Tiedje wrote:

> Execution:
> 1. Put both file into the same directory
> 2. perl whatever.pl
> 
> What I get (within ""):
> "Before fork
> The Unsupported function fork function is
> unimplemented at whatever.pl line 3."

Your Perl is too old. Win machines never really had proper 
forking-mechanisms. In recent Perls (>= 5.6.0, I think), there is an 
emulation (hmmh, or simulation?) that may get close to what fork() can 
do on a decent operating system.

You should either go for ActiveState's Perl (http://www.activestate.com) 
or get yourself the cygwin tools and role your own Perl from the sources 
using the gcc.

The first solution is easier, while the second solution might be more 
pleasant on the long run in regards to installing CPAN modules, 
and....ummh, in regards to a more UNIXish development environment. ;-)

Tassilo

-- 
$a=[(74,116)];$b=[($a->[1]-1,$a->[1]++,0x20)];$c=[(97,110)];$d=[($c->
[1]+1,$b->[1],"her")];for(@{[$a,$b,$c,$d]}){for(@{$_}){$_=~/\d+/?print
(chr($_)):print;}}$c=sub{$l=shift;[(0x20+$l-1,0x50,0x65,0x73-0x01,108
),(0x20,0x68,0x61,)]};print(map{chr($_)}@{($c->(1))});$h={a=>33*3,b=>
10**2+7,c=>"1"."0"."1",d=>0162};@h=sort(keys(%$h));for(@h){print(chr(
ord(chr($h->{$_}))))};



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

Date: Tue, 21 Aug 2001 17:45:28 +0200
From: Philippe PERRIN <philippe.perrin@sxb.bsf.alcatel.fr>
Subject: Re: fork() does not work
Message-Id: <3B828218.62F0009@sxb.bsf.alcatel.fr>

Tassilo von Parseval wrote:
> Your Perl is too old. Win machines never really had proper
> forking-mechanisms.

Windows2000 fully implements forking. It's a shame activeperl doesn't
use it.

> You should either go for ActiveState's Perl (http://www.activestate.com)
> or get yourself the cygwin tools and role your own Perl from the sources
> using the gcc.

Cygwin is also an emulation, unable to use W2000's support for forking.

I suppose it's all the same for NT4.

-- 
PhP

($r1,$r2,$r3,$r4)=("19|20","0|1","28|29","5|24");($r5,$r6)=("9|10|15|16|$r1|$r2","9|10|$r3");%h=("1|",$r6,"1=","[1-5]|2[0-4]","1/","0|19","1\\","6|25","2|","0|6|19|25|$r6","2/","1|20","2\\",$r4,"3|","$r2|6|$r1|25|$r6","3/",$r4,"4|","$r2|$r1|$r6","4=","2|3|4|11|12|13|14|21|22|23","4/",$r4,"4\\",15,"5|","$r2|9|15|$r1|20|$r3","5/",10,"6|",$r5,"7|",$r5,"7/",$r3);for($l=1;$l<8;$l++){b:for($i=0;$i<30;$i++){c:foreach(keys
%h){next c if(!(/^$l(.*)$/));$a=$1;if($i=~/^($h{$_})$/){print $a;next
b;}}print " ";}print "\n";}


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

Date: Tue, 21 Aug 2001 17:07:55 +0200
From: Tassilo von Parseval <Tassilo.Parseval@post.rwth-aachen.de>
Subject: Re: Forwarding To A Page Dependant on User Choice In A Form??
Message-Id: <3B82794B.9030901@post.rwth-aachen.de>

Ryan Hnetka wrote:

> They tell me their form will do everything I need, but from looking at the
> information on their site, I can't see how.  Has anyone had any experience
> with this form, and if so, do you think it will provide me with everything I
> need?

It will probably do what it claims. However, two reasons why you should 
not pay money for that, in particular not to this company:

1) It can just as well be done by writing such a thing on one's own. All 
you'll need is a little bit of working into Perl.

2) As a little punishment for this company that obviously uses the 
demo-forms not just for demonstration purpose. In each form a valid 
email is required (allegedly for the sake of sending you the result by 
email). However, in the second form they ask you for your general 
interests and hobbies. I am sure, after a while you haven't just got 
their reply but also some other emails trying to talk you into using 
some services (all FOR FREE! of course).

If you are doubting reason 1, I'd recommend you to search another 
script. There are virtually thousands of CGI form processors out. 
Amongst these thousands there'll be enough free solutions that are 
probably doing just as well as this one.

Tassilo

-- 
$a=[(74,116)];$b=[($a->[1]-1,$a->[1]++,0x20)];$c=[(97,110)];$d=[($c->
[1]+1,$b->[1],"her")];for(@{[$a,$b,$c,$d]}){for(@{$_}){$_=~/\d+/?print
(chr($_)):print;}}$c=sub{$l=shift;[(0x20+$l-1,0x50,0x65,0x73-0x01,108
),(0x20,0x68,0x61,)]};print(map{chr($_)}@{($c->(1))});$h={a=>33*3,b=>
10**2+7,c=>"1"."0"."1",d=>0162};@h=sort(keys(%$h));for(@h){print(chr(
ord(chr($h->{$_}))))};



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

Date: 21 Aug 2001 15:20:46 GMT
From: ebohlman@omsdev.com (Eric Bohlman)
Subject: Re: Forwarding To A Page Dependant on User Choice In A Form??
Message-Id: <9ltu8e$kkt$1@bob.news.rcn.net>

In comp.lang.perl.misc Ryan Hnetka <rhnetka@myasphosting.com> wrote:

> I am new to this list, so I apologize in advance if I mess something up.

Well, you did mildly mess up, first by referring to this newsgroup as a 
"list."

> I am trying to find a CGI script available for free or for a small fee that
> will allow me to....well, maybe I will just explain what I need...

> The page will be a form for someone to fill in the normal information (name,
> address, etc)  The form will also include a set of radio buttons (or a drop
> down list).  This list will be of six different airplanes for sale.  The
> user will choose which plane they are interested in.  Once they are finished
> filling in our required information, and choosing which plane they are
> interested in, they will hit a submit button.

> The actions I need the CGI to do are these:

>     - process the form and send all the information to multiple email
> accounts
>     - forward the user to a specific URL, based on which plane they wanted
> more information on.  Basically, the page with the information on the one
> plane they choose.

> Is this possible?  I have looked at many of the regular sites for CGI
> scripts, and such and can't find a thing that says it can do this.

It's certainly possible, and in fact quite easy for an experienced Perl 
programmer to write, but your requirements are specific enough that you're 
not likely to find something that does it already written.

This group really isn't the place to solicit people to write programs for 
you (it's already very high-volume, and encouraging such solicitations 
would just raise the volume to an unacceptable level).  There's really 
nowhere on Usenet that's really appropriate for this sort of thing; the 
groups with ".jobs" in their names are really for offers of salaried 
positions, not requests for one-off programming tasks.  I'd say your best 
bet would be to go to <http://www.perl.org> and find out where the nearest 
Perl Mongers group is to you.  There are probably group members who would 
be willing to develop such a script for you (for a fee, of course; if the 
proposals you get seem expensive to you, remember that *coding* a program 
is only a small part of *developing* a program; among other things, 
there's testing, which can be rather time-consuming when the program, as 
yours does, needs to interact with other resources out of its control).

I'm presuming here that you don't have enough Perl programming experience 
to write such a thing yourself (most people who have enough experience 
wouldn't come here and ask if what they want to do is "possible").  If I'm 
wrong, then writing it yourself should be easy once you learn about the 
following:

CGI.pm for getting the data from the form, sending out the redirects, and
possibly generating the form.

Various Mail::* modules for sending the emails.

Hashes, for determining which page to redirect to based on a form value.

Good luck.



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

Date: Tue, 21 Aug 2001 08:54:01 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Forwarding To A Page Dependant on User Choice In A Form??
Message-Id: <3B828419.7F5B82B@stomp.stomp.tokyo>

Ryan Hnetka wrote:
 

(snipped)
 
> I am new to this list, so I apologize in advance if I mess something up.

You messed up by apologizing in advance. This is highly illogical.
Why do you post an article which motivates you to apologize?

  "I apologize in advance for setting your head on fire."


> I am trying to find a CGI script available for free or for a
> small fee that will allow me to....

Send me two-hundred c-notes and, I will send you this script.

 
> This list will be of six different airplanes for sale.  The
> user will choose which plane they are interested in.

Do you honestly believe a person in a financial position to
purchase an airplane will do so via the internet?


 Airbus A-340 Party Plane            [Add To Shopping Cart]
 Boeing 747 Luxury Aeroliner         [Add To Shopping Cart]
 Boeing DC-10 Drug Smuggler          [Add To Shopping Cart]
 F-18 SRA Terrorist Special          [Add To Shopping Cart]



  * This guy is an airplane dealer and can't afford a program? *


Godzilla!  Queen Of Sky Pilots.


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

Date: Tue, 21 Aug 2001 15:49:51 GMT
From: Michael Budash <mbudash@sonic.net>
Subject: Re: get html files with perl script BUT using a proxy!
Message-Id: <mbudash-FA1D59.08495321082001@news.sonic.net>

In article <3b824903$1@netnews.web.de>, Elvis Samson <esamson@web.de> 
wrote:

> hi,
> 
> 
> i have problems of downloading html files with a perl script, because the 
> proxy 
> of our network uses authentication. so i need a way, of telling the 
> user/pass 
> before downloading.
> 
> 
> until now i use a system call with wget, but then i have to set 
> http_proxy 
> before running the script. i hope to sace resources, when i download the 
> files 
> directly into a perl string and not first into a file and so on...
> 
> 
> i looked for a module in cpan, but i didn't understand this in 
> lwp:ueragent
> 
> 
> ------------------------------------------------------------------------
> $ua->credentials($netloc, $realm, $uname, $pass) 
> 
> 
> Set the user name and password to be used for a realm. It is often more 
> useful 
> to specialize the get_basic_credentials() method instead. 
> $ua->get_basic_credentials($realm, $uri, [$proxy]) 
> 
> 
> This is called by request() to retrieve credentials for a Realm protected 
> by 
> Basic Authentication or Digest Authentication. 
> Should return username and password in a list. Return undef to abort the 
> authentication resolution atempts. 
> 
> 
> This implementation simply checks a set of pre-stored member variables. 
> Subclasses can override this method to e.g. ask the user for a 
> username/password. 
> An example of this can be found in lwp-request program distributed with 
> this 
> library. 
> ------------------------------------------------------------------------
> 
> 
> what do i have to use for $netloc and $realm ?
> 
> 
> thanks, elvis

per lwpcook.pod:

---------------------------------------------------------------------
PROXIES
[snip part one]
       Some proxies also require that you send it a
       username/password in order to let requests through.  You
       should be able to add the required header, with something
       like this:

        use LWP::UserAgent;

        $ua = new LWP::UserAgent;
        $ua->proxy(['http', 'ftp'] => 'http://proxy.myorg.com');

        $req = new HTTP::Request 'GET',"http://www.perl.com";
        $req->proxy_authorization_basic("proxy_user", "proxy_password");

        $res = $ua->request($req);
        print $res->content if $res->is_success;

       Replace proxy.myorg.com, proxy_user and proxy_password
       with something suitable for your site.
---------------------------------------------------------------------

hth-
-- 
Michael Budash ~~~~~~~~~~ mbudash@sonic.net


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

Date: Tue, 21 Aug 2001 17:55:43 -0000
From: Craig Berry <cberry@cinenet.net>
Subject: Re: Good old regexp teaser
Message-Id: <Xns91046F2C75E7cberrycinenetnet1@207.126.101.92>

"S Warhurst" <s.warhurst@rl.ac.uk> wrote in
news:9ltco5$20je@newton.cc.rl.ac.uk: 

> Just when you think you have regexp sussed, you get something you can
> get to work like this! SO here goes:
> 
> $line = "subscription= by owner ack= yes confidential= yes";
> 
> These are listserv keywords and their appropriate settings, eg:
> "subscription= by owner", "ack= yes" and "confidential= yes". What I
> want to do is break them up into individual keyword/setting pairs.

Not a pure regex solution, but rather using the right regex in split:

  @pairs = split /(?=\b\w+=)/, $line;

-- 
Craig Berry <http://www.cinenet.net/~cberry/>
"That which is now known, was once only imagined." - William Blake



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

Date: Tue, 21 Aug 2001 09:38:28 -0700
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: How do I sort a 2D-array by three different columns with perl
Message-Id: <3b828e84$1@news.microsoft.com>

"ED" <gineric2@mindspring.com> wrote in message
news:88105013.0108202127.768e0fb4@posting.google.com...
> I need a way to sort a 2D-array by one column, then by a second, and
> finally by a third. [...]
>
> I know how to sort by a single column using:
> @sorted_result = sort { $a->[5] cmp $b->[5] } @result;
> where 5 is the column to sort the rows by.  However, how do I expand
> on this to then sort by a second and third column without comprimising
> the original sort?

Two possibilities:
- create a more complex compare function which takes all three columns into
account
- or simply sort by the third column first, then the same array by the
second, and again by the first. Since Perl 5.6 "sort" is stable, i.e. if two
elements have the same ranking it will preserve there order

jue




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

Date: Tue, 21 Aug 2001 16:09:41 GMT
From: Gisle Aas <gisle@ActiveState.com>
Subject: Re: HTTP::Request::Common file upload
Message-Id: <m3snel5r7a.fsf@ActiveState.com>

"Peter du Marchie" <pdumarchie@goldenbytes.com> writes:

> Hi everyone,
> 
> I wonder if someone can tell me if it is possible to upload files that are
> only in memory, not on disk.
> 
> I know I can put them on disk first, but I'd rather not, because I extract
> them from an email message, and I don't want to have to check for duplicate
> filenames, etc.
> 
> According to the documentation for HTTP::Request::Common, I have to "[u]se
> an undef as $file value if [I] want to specify the content directly." But
> what does that mean? How do I provide the contents if $file has to be
> undefined?

Like this:

   use HTTP::Request::Common qw(POST);

   $req = POST "http://www.perl.com",
               content_type => 'form-data',
               content      => [
		  	         foo => 'bar',
			         file => [undef, "hello.txt",
				          content_type => 'text/plain',
				          content => "This is some text\nfor you!\n",
				         ]
		               ];
   print $req->as_string;

-- 
Gisle Aas


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

Date: 21 Aug 2001 17:02:56 GMT
From: DDR <ddr@rac1.wam.umd.edu>
Subject: Index for input line array?
Message-Id: <9lu480$hkf$1@dailyplanet.wam.umd.edu>

Hi all,

Is there a way that I can use something like an associative array to store
an input line, and refer to each word as an element of the array?

For example, if the input line is:

       This is a test.

then I'd like to be able to store it in an array like @inputline and refer
to the words like this:

        @inputline[0] == This
        @inputline[1] == is
        @inputline[2] == a
        @inputline[3] == test.

I know I could use getc() to parse the line and build a data structure to
hold the parsed words -- I'm just hoping that there is a built-in way to
do this.

Thank you very much!

-- 
DDR


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

Date: 21 Aug 2001 12:19:42 -0500
From: Ren Maddox <ren@tivoli.com>
Subject: Re: Index for input line array?
Message-Id: <m3u1z1uy8h.fsf@dhcp9-161.support.tivoli.com>

On 21 Aug 2001, ddr@rac1.wam.umd.edu wrote:

[snip]
> For example, if the input line is:
> 
>        This is a test.
> 
> then I'd like to be able to store it in an array like @inputline and
> refer to the words like this:
> 
>         @inputline[0] == This
>         @inputline[1] == is
>         @inputline[2] == a
>         @inputline[3] == test.
[snip]

Assuming the input line is in $_, you can just use:

  @inputline = split;

Also note that for now (until Perl 6, that is), the syntax for
accessing a single element of an array is $inputline[0], not
@inputline[0].  The latter is a single-element slice, which often has
the same effect, but not always.

-- 
Ren Maddox
ren@tivoli.com


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

Date: 21 Aug 2001 08:10:16 -0700
From: phil.hibbs@capgemini.co.uk (Phil Hibbs)
Subject: Microsoft Perl
Message-Id: <153e25f0.0108210710.549d1926@posting.google.com>

When I do "perl -v" I get this:

This is perl, version 5.001

        Unofficial patchlevel 1m.

Copyright 1987-1994, Larry Wall
Win32 port Copyright (c) 1995 Microsoft Corporation. All rights
reserved.
        Developed by hip communications inc.,
http://info.hip.com/info/

        Perl for Win32 Build 110
        Built Aug 13 1996@08:18:50
Perl may be copied only under the terms of either the Artistic License
or the
GNU General Public License, which may be found in the Perl 5.0 source
kit.

Is anyone familiar with this version of perl? I have to get to know
and love it, because it's installed on a customer site.

Phil.


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

Date: 21 Aug 2001 09:20:50 -0800
From: yf110@vtn1.victoria.tc.ca (Malcolm Dew-Jones)
Subject: Re: Microsoft Perl
Message-Id: <3b828a62@news.victoria.tc.ca>

Phil Hibbs (phil.hibbs@capgemini.co.uk) wrote:
: When I do "perl -v" I get this:

: This is perl, version 5.001

:         Unofficial patchlevel 1m.

: Copyright 1987-1994, Larry Wall
: Win32 port Copyright (c) 1995 Microsoft Corporation. All rights
: reserved.
:         Developed by hip communications inc.,
: http://info.hip.com/info/

:         Perl for Win32 Build 110
:         Built Aug 13 1996@08:18:50
: Perl may be copied only under the terms of either the Artistic License
: or the
: GNU General Public License, which may be found in the Perl 5.0 source
: kit.

: Is anyone familiar with this version of perl? I have to get to know
: and love it, because it's installed on a customer site.

: Phil.


Microsoft used to distribute a version of Perl for NT4, when NT4 first
came out.

I would guess that this is that version.

Do they use this version on other projects?



--
Want to access the command line of your CGI account?  Need to debug your
installed CGI scripts?  Transfer and edit files right from your browser? 

What you need is "ispy.cgi" - visit http://nisoftware.com/ispy.cgi


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

Date: Tue, 21 Aug 2001 18:45:07 +0100
From: "S Warhurst" <bigusAT@btinternetDOT.com>
Subject: Net::NNTP
Message-Id: <9lu6g2$sta$1@plutonium.btinternet.com>

I am trying to get a script working to enable me to post to a newsgroup (not
for spamming purposes, but for a notification to a private newsgroup). Here
is the code:

----------------
use Net::NNTP;
my $nntpserver = 'news.server.com';
my $server = Net::NNTP->new($nntpserver, Debug => 1) || die $!;

my $user = 'username';
my $pass = 'password';
$server->authinfo($user,$pass) || die "Auth failed $!";

my $newsgroup = 'the.news.group';
unless ( $server->postok() ) { die "Posting not allowed $!" };

my @Message = ( "Newsgroups: $newsgroup\015\012",
                "From: email\@address.com\015\012",
                "Subject: Test Net-NNTP\015\012",
                "\015\012",
                "Hello world\015\012"
                );
my $OK = $server->post(\@Message);

$OK ? print "Message sent\n" : print "ERROR post failed \n";
$server->quit();
----------------
The thing is, it falls over when posting.. here is the debug info:

Net::NNTP=GLOB(0x1c7dcf4)<<< 200 Hamster-NNTP, Hamste
3.22.0)
Net::NNTP=GLOB(0x1c7dcf4)>>> MODE READER
Net::NNTP=GLOB(0x1c7dcf4)<<< 200 ignored
Net::NNTP=GLOB(0x1c7dcf4)>>> AUTHINFO USER username
Net::NNTP=GLOB(0x1c7dcf4)<<< 381 More authentication information required
Net::NNTP=GLOB(0x1c7dcf4)>>> AUTHINFO PASS ....
Net::NNTP=GLOB(0x1c7dcf4)<<< 281 Authentication accepted
Net::NNTP=GLOB(0x1c7dcf4)>>> POST
Net::NNTP=GLOB(0x1c7dcf4)<<< 340 OK, recommended ID
<9lu9fn.3vs464b.1@the.server.com>
Net::NNTP=GLOB(0x1c7dcf4)>>> Newsgroups: the.news.group
Net::NNTP=GLOB(0x1c7dcf4)>>> From: email@address.com
Net::NNTP=GLOB(0x1c7dcf4)>>> Subject: Test Net-NNTP
Net::NNTP=GLOB(0x1c7dcf4)>>>
Net::NNTP=GLOB(0x1c7dcf4)>>> Hello world
Net::NNTP=GLOB(0x1c7dcf4)>>> .
Net::NNTP=GLOB(0x1c7dcf4)<<< 441 posting failed (missing
From|Subject|Newsgroups)
Net::NNTP=GLOB(0x1c7dcf4)>>> QUIT
Net::NNTP=GLOB(0x1c7dcf4)<<< 205 Closing connection.

I tried another news server and that came back with "441 posting failed no
body -- all header" or something similar.

Anyone got any ideas why it isn't working please?

¦                 ¦--¦
¦--¦- Bigus -¦--¦
¦--¦






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

Date: Tue, 21 Aug 2001 15:54:46 +0200
From: "Steffen Müller" <tsee@gmx.net>
Subject: Re: New Books on Web Site Design
Message-Id: <9lu03g$6re$01$1@news.t-online.com>

[Removed comp.lang.javascript]

"scienceweb" <scienceweb@my-deja.com> schrieb im Newsbeitrag
news:4f08993c.0108210219.938a47d@posting.google.com...
> New Books on Web Site Design are listed on
>
> www.science-books.net/wsdesign.htm
>
> Let us know if you have any other suggestions for adding to the page.

I have a question: What in hell does this have to do with a purely Perl
oriented newsgroup?

Try comp.infosystems.www.authoring.[something].

Please try to avoid posting off-topic in the future.

Thank you,

Steffen Müller




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

Date: Tue, 21 Aug 2001 12:13:09 -0400
From: Sean Quinlan <seanq@darwin.bu.edu>
Subject: Re: new modules - looking for (sort-of-)pre-release input
Message-Id: <3B828895.E8E59301@darwin.bu.edu>

Simon Andrews wrote:

> [cc'd to original poster]
>
> Sean Quinlan wrote:
> >
> > Thanks in advance to anyone who takes the time to look this over!
> >
> > I'm in the process of  'creating' a few modules that I will be or have
> > uploaded to CPAN and hope to have listed in the modules list. They are
> > currently developed under the CompBio namespace.
>
> [snip]
>
> > I also welcome any suggestions for appropriate additions to these
> > modules, modules that would fit well in this group, and/or if interested
> > in collaborating on this project. Please feel free to e-mail me at
> > seanq@darwin.bu.edu.
>
> Sean,
>
> You asked for suggestions for what to do with these modules, you seem to
> have done quite a bit already! If you are interested, my suggestion
> would be to integrate some of the stuff you are doing into the existing
> bioperl project (www.bioperl.org).  They already have modules to perform
> some of the tasks that yours do, as well as many you may be considering
> writing.  They are always keen to get more people involved, and you may
> find that many of the tools you would find useful are already available
> (there is already a Bioperl DB module for instance).  If nothing else,
> then their code is free, so you can save yourself some development!

> Bioperl is a pretty big project, and is the backend for large projects
> such as www.ensembl.org.  You can look through their latest release
> either by getting from their site, or from CPAN
>
> (http://search.cpan.org/search?mode=module&query=bioperl)
>
> I hope this is of interest
>
>         TTFN
>
>         Simon.

Thanks Simon!

Although I would be flattered if the bioperl maintainers thought they could
make use of some of my code, truth be told it exists mostly _because_ bioperl

is so big.  Which is also why I state in the docs (perhaps not clearly
enough?),
that the CompBio modules are in no way a replacement for the excellent effors
of the
bioperl project. I certainly expect that there will be some functions,
perhaps
most, in CompBio that are also provided by bioperl. My goal is just to
provide
a, hopefully,  simpler way to do be able to do a small subset of the tasks I,
and
others I've talked to, have found to be very commonly needed.

As for the DB module, as I understand it, and I may well be wrong, bioperl
uses a
_very_ OO approach to it's design, and it's DB modules are set up to interact
with
the database sequence 'objects' that are used in all of bioperls suite of
code. And
although it does appear to fetch outside data through many different
websites, it
does not _appear_ to have ways to connect to a local RDBMS. The DB module I
have is designed to interact with relational databases in a fairly
straightforward
(again, I hope) manner.

Those are some of the reasons for the existance of this as a seperate
project. All
that being said, I do agree I should probably make more of an effort to
contact the
bioperl maintainers. Although I believe there are _very_ good reasons for
something
like the module set I have made available, there is no reason why it should
be
considered an either/or match against bioperl; I _certainly_ don't want it to
be.  If,
as the modules I've released mature, I get the nod to extract code from
bioperls
existing work to fill them out, and people working on bioperl projects find
some of
the code I've released useful, GREAT!

Again, thank you very much for your input. I hope my explination of why I'm
not
simply submitting this code to bioperl and instead releasing it as a seperate
set
makes sense to you. If not, I'd be happy to continue this discusion.

--------------------------
Sean Quinlan
mailto:seanq@darwin.bu.edu
http://bmerc-www.bu.edu/

"You can discover more about a person in an hour of play than in a year of
conversation" - Plato





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

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


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