[9746] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3340 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Aug 4 12:06:14 1998

Date: Tue, 4 Aug 98 09:00:32 -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, 4 Aug 1998     Volume: 8 Number: 3340

Today's topics:
    Re: APPEND TO DBM? HELP! <abarfoot@eng.auburn.edu>
        Argh! <jpratt@command-central.nmsd.k12.nm.us>
    Re: Cheapest Win32 5.005 build <snif@xs4all.nonono.nl>
    Re: Cheapest Win32 5.005 build <dparrott@ford.com>
        Checkboxes jsunshine@my-dejanews.com
    Re: Checkboxes <guillaume@nospam.com>
        Client side functions <fcalabro@aisvt.bfg.com>
    Re: Client side functions <Tony.Curtis+usenet@vcpc.univie.ac.at>
    Re: Client side functions <quednauf@nortel.co.uk>
    Re: comp.lang.perl.announce redux <jdf@pobox.com>
    Re: comp.lang.perl.announce redux (Abigail)
        Contributions to Perl (was Re: hiding user input) <dgris@rand.dimensional.com>
    Re: Does anybody have a BANNER AD program? <alan@find-it.furryferret.uk.com>
    Re: Does anybody have a BANNER AD program? <rickryan@mindspring.com>
        File already opened by another process? (JJ Good)
    Re: File problems (Kevin Reid)
        File Upload with Perl (Darren Ferguson)
    Re: Has anyone used the POP3 module ? <snif@xs4all.nonono.nl>
        Help! Stuck with an array assignment problem bolesbr1@memorialmed.com
    Re: Help! Stuck with an array assignment problem <guillaume@nospam.com>
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Tue, 4 Aug 1998 09:24:17 -0500
From: andy barfoot <abarfoot@eng.auburn.edu>
To: c.clark@student.unsw.edu.au
Subject: Re: APPEND TO DBM? HELP!
Message-Id: <Pine.SOL.3.96.980804091930.16427E-100000@leahy.eng.auburn.edu>



dbmopen %d,'database',undef or die;
#stuff
dbmclose %d;

Where #stuff is, for adding a couple _records_,
	$d{key1} = "value1";
	$d{key2} = "value2";
or, for adding new _fields_ to all records,
	while (($key,$val) = each %d) {
		# foo() is a subroutine that figures out the
		# value of the new field. 
		$d{$key} .= $field_separator . foo($key,$val);
	}


--
 andy.barfoot@eng.auburn.edu


On Tue, 4 Aug 1998 c.clark@student.unsw.edu.au wrote:

> 
> I am desperately trying to append data to an existing DBM file,
> however so far have been unable.
> 
> I know of the O_APPEND thing and how it is somehow linked to the "tie"
> function.  I am new at PERL and all I need is a nice simple example
> and I am set.  Can anyone provide me with one?  Just a snippet of code
> that demonstrates appending certain fields to a DBM file.
> 
> I have looked in the FAQ (I'm sure everyone says that, but it's true)
> and heaps of places on the Web, but I can't find a nice piece of
> example code.
> 
> Hope you can help,
> 
> 
> Chris.
> 
> 
> 



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

Date: Tue, 04 Aug 1998 10:34:21 -0700
From: "J. Pratt" <jpratt@command-central.nmsd.k12.nm.us>
Subject: Argh!
Message-Id: <35C7461D.AFA3EE59@command-central.nmsd.k12.nm.us>

Hi..

I'm not sure whether or not anyone recalls (although I don't necessarily
expect anyone to) my original post, but what I'm doing is a CGI (using
CGI.pm) that will allow ppl to delete a line from a plain text file by
selecting a corresponding checkbox then submitting the form.  My
original problem is stated below, but maybe I've went about this the
wrong way.  If anyone has a moment to spare, perhaps you could toss me
some powerful insight.

First, I open a file with the filehandle A, then I read A into an array
variable -- @what.  Next, each line is assigned a number depending on
its element sequence (duh:).  The element number is printed along with a
checkbox and the corresponding line of text. (ie [ ] 0 bleh@blah.com
feh@fah.com)  Here is the if() statement I am using..

$i = 0;

if (param('action') eq 'Process') {
  process();
} else {
  for (@what) {
    print checkbox(-name=>"$i",-checked=>0),"$_","<br>";
    $i++; }
  print submit(-name=>'action',-value=>'Process');
}

Ok, with that explained, here's the issue.  At first, what I was
planning on doing was having process() simply be a test if statement. 
For example, if ($param{$i} == 1) { print "test." }  .. I was going to
do that just to make sure it was executing a certain code if the
checkbox was marked.  However, this doesn't seem to be the approach to
use.  If you notice, $i = 0..  So, if I say if ($param{$i} == 1), it's
going to fail.  Because $i is 0.  I thought if I did an if ($param{$i}
== 1) that it would check the 'checked' value of each element in $i, but
it doesn't.  With that in mind, I have a feeling I need to go about this
another way.  I had in mind that if the 'checked' value is 1 (on) then
it would remove that line from the array..  or something.  What would
you suggest?  This is ultimately going to be an online virtual user
table editor (You're familiar with that sendmail feature?).  It will
have an add and delete function -- the add function is done.  Now, I'm
(still) working on the delete function.

Once again, thanks..  If anything is unclear, please let me know.

- JP

--SNIP--

#!/usr/bin/perl

use CGI ':standard';

open (A, "~/hmm");

$i = 0;

@what = <A>;
close (A);

print header;
print start_html(-title=>'feh');

print start_form;

if (param('action') eq 'Process') {
  process();
} else {
  for (@what) {
    print checkbox(-name=>"$i",-checked=>"0"),"$_","<br>";
    $i++; }
  print submit(-name=>'action',-value=>'Process');
}

end_form;
print end_html;

sub process {
  if ($param{'$i'} == 1) {
    print "whatever.";
  }
}


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

Date: Tue, 4 Aug 1998 15:55:44 +0200
From: "Jonkers" <snif@xs4all.nonono.nl>
Subject: Re: Cheapest Win32 5.005 build
Message-Id: <6q73rh$oe$1@news.gns.getronics.nl>

Brent Michalski wrote in message <35C6F516.1BE83DA8@inlink.com>...
>I may be missing something, but do you realize that you can get Perl
>5.005 already compiled for FREE!
>
>Just go to http://www.perl.com and click on "latest version", from
>there, choose one of the Win32 ports...

The ActiveState version http://www.activestate.com/ActivePerl/download.htm
looks indeed like Perl 5.005: "Perl for Win32 based on Perl 5.005". (I could
not install therefore not check this version).

But the "Gurusamy Sarathy's binary version of Perl" (=bindist) is still
perl5.00402-bindist04-bc.zip (at least on my mirror
ftp://ftp.cs.ruu.nl/pub/PERL/CPAN/ports/win32/Standard/x86 )

Sander






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

Date: Tue, 04 Aug 1998 10:23:42 -0400
From: "Dennis M. Parrott" <dparrott@ford.com>
To: perlguy@technologist.com
Subject: Re: Cheapest Win32 5.005 build
Message-Id: <35C7196E.5D5B@ford.com>

Brent Michalski wrote:
> 
> I may be missing something, but do you realize that you can get Perl
> 5.005 already compiled for FREE!
> 
> Just go to http://www.perl.com and click on "latest version", from
> there, choose one of the Win32 ports...
>

While it is true that there are good-hearted souls that provide the
service of pre-compiled distributions, there are valid reasons for
raising the question of which compiler version is required to build
5.005 for Win32. To wit,

	- suppose I want to build my own extensions using XS?
	  gotta have a compiler for that, right?
	- suppose that I want to port a module that does not
	  now exist for Win32? ditto!
	- suppose the company I work for has a policy that all
	  "net freebies" have to be brought in as source, be
	  subjected to a reading of the source and be compiled
	  by someone on staff? ditto^2!

For those who aren't paranoid about putting possibly tainted 
code on our machines, a download from CPAN of the binaries is
just ducky. However, it really does not work for everybody.

My thanks to those good-hearted souls who are doing the port
and providing those binaries! I know that I appreciate their
efforts!
 
> HTH,
> 
> Brent

-- 

-----------------------------------------------------------------------
Dennis M. Parrott        |            Unix:  dparrott@ford.com
PCSE Webmaster           |           PROFS:  DPARROTT
Ford Motor Company       |             VAX:  EEE1::PARROTT
Dearborn, Michigan USA   | public Internet:  dparrott@ford.com
-----------------------------------------------------------------------
Voice: 313-322-4933  Fax: 313-248-1234  Pager: 313-201-9978


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

Date: Tue, 04 Aug 1998 14:02:45 GMT
From: jsunshine@my-dejanews.com
Subject: Checkboxes
Message-Id: <6q74a5$9qs$1@nnrp1.dejanews.com>

I created an intranet page for secretaries of each of the departments within
my law-firm so they could post the daily absences on the intranet site
without messing with HTML or FrontPage. The form is simply a bunch of
checkboxes with each persons name, a password field, and a submit button. I
wrote a perl script that simply writes: "<li>NAME</li>"/n to a text file for
each name that is checked. I then used a server-side include in another html
file (.stm of course) between the regular html (e.g.
<HTML><HEAD></HEAD><BODY><UL> SERVER- SIDE INCLUDE</UL></BODY></HTML>) For
some strange reason only the first eleven check boxes work. This does not
mean that only 11 people can be absent in a day (that would not be a
problem!!) it means that only the first eleven names can ever be absent.
HELP!!!!!!!

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Tue, 4 Aug 1998 16:11:52 +0100
From: "Planet News" <guillaume@nospam.com>
Subject: Re: Checkboxes
Message-Id: <6q78ef$4kf$1@svr-c-01.core.theplanet.net>

show us your code!


jsunshine@my-dejanews.com wrote in message
<6q74a5$9qs$1@nnrp1.dejanews.com>...
>I created an intranet page for secretaries of each of the departments
within
>my law-firm so they could post the daily absences on the intranet site
>without messing with HTML or FrontPage. The form is simply a bunch of
>checkboxes with each persons name, a password field, and a submit button. I
>wrote a perl script that simply writes: "<li>NAME</li>"/n to a text file
for
>each name that is checked. I then used a server-side include in another
html
>file (.stm of course) between the regular html (e.g.
><HTML><HEAD></HEAD><BODY><UL> SERVER- SIDE INCLUDE</UL></BODY></HTML>) For
>some strange reason only the first eleven check boxes work. This does not
>mean that only 11 people can be absent in a day (that would not be a
>problem!!) it means that only the first eleven names can ever be absent.
>HELP!!!!!!!
>
>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum




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

Date: Tue, 04 Aug 1998 10:37:29 -0400
From: Finn Calabro <fcalabro@aisvt.bfg.com>
Subject: Client side functions
Message-Id: <35C71CA9.F9114A0@aisvt.bfg.com>

I have a form that posts data to a cgi script, both running on a unix
server.  I need the cgi script to search for and find a program on the
client's computer (it is on our intranet so everyone has the software,
though it may be in a different location or a different drive), create a
script, and run the said program with the script.  I'm really just
looking for a starting point on executing client side functions.
Thanks.



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

Date: 04 Aug 1998 16:42:29 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: Client side functions
Message-Id: <7x3ebc24h6.fsf@fidelio.vcpc.univie.ac.at>

Re: Client side functions, Finn <fcalabro@aisvt.bfg.com>
said:

Finn> I have a form that posts data to a cgi script, both
Finn> running on a unix server.  I need the cgi script to

both?

Finn> search for and find a program on the client's computer
Finn> (it is on our intranet so everyone has the software,
Finn> though it may be in a different location or a
Finn> different drive), create a script, and run the said
Finn> program with the script.  I'm really just looking for
Finn> a starting point on executing client side functions.

Sorry, not possible with CGI (rightly so, CGI runs on the
server-side, only its output goes back to the invoking
client).

You'd have to use java (although it sounds as if you want to
break out of all and any sandboxes)...

or...

maybe use some customised MIME type with a locally installed
launch application (since it sounds as if you could
influence browser setup in an intranet environment).

There are probably many other ways of doing such things.

hth
tony
-- 
Tony Curtis, Systems Manager, VCPC,    | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien,  | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds!  | private email:
    Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>


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

Date: Tue, 04 Aug 1998 16:07:54 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: Client side functions
Message-Id: <35C723CA.6F463CF4@nortel.co.uk>

Finn Calabro wrote:
> 
> ... I need the cgi script to search for and find a program on the
> client's computer...

ActiveX thingies do such things, with Windows. Scary Stuff.
-- 
____________________________________________________________
Frank Quednau               
http://www.surrey.ac.uk/~me51fq
________________________________________________


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

Date: 04 Aug 1998 10:39:37 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: Jim Brewer <jimbo@soundimages.co.uk>
Subject: Re: comp.lang.perl.announce redux
Message-Id: <4svspxhi.fsf@mailhost.panix.com>

Jim Brewer <jimbo@soundimages.co.uk> writes:

> As an aside, what's the difference between a 'plain silly' and a, say,
> "fancy silly"? :-)

Plain:

   $i = $i + 1;   # increment $i

Fancy:

   $i += print "I'm incrementing \$i.\n";

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf/


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

Date: 4 Aug 1998 15:39:48 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: comp.lang.perl.announce redux
Message-Id: <6q7a04$fm$1@client3.news.psi.net>

Alessandro Forghieri (alf@orion.it) wrote on MDCCXCIX September MCMXCIII
in <URL: news:543ebdm4sw.fsf@alpha.orion.it>:
++ 
++ 
++ I cannot read German. Therefore I tested the above mentioned paragraph
++ in Italian, which is my language. It does provide comic relief, but
++ the informational content is somwhat lacking - it sounds like (the
++ back-translation is mine):
++ 
++ As this is: the moderator adds a link to the lower part of each
++ little tree (added via a written of the perl) which rightly invokes
++ BabelFish of the Alavista so as to give a desired translation.

Isn't it odd? People complain about the low quality of translations,
yet insists on having announcements translated to English - cause they
won't be able to read the original message.


People, if you can't read French, German, Italian, or Polish, that's
your loss. Don't punish others by forcing them to translate due to
your own shortcomings.



Abigail
-- 
perl -wleprint -eqq-@{[ -eqw+ -eJust -eanother -ePerl -eHacker -e+]}-


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

Date: Tue, 04 Aug 1998 15:16:53 GMT
From: Daniel Grisinger <dgris@rand.dimensional.com>
Subject: Contributions to Perl (was Re: hiding user input)
Message-Id: <6q77ua$1mh$1@rand.dimensional.com>

[posted to comp.lang.perl.misc and mailed to the cited author]

In article <m3n29l13ld.fsf@windlord.Stanford.EDU>
Russ Allbery <rra@stanford.edu> wrote:

>I hate it when this argument comes up.

Why, this is a valid and important argument.  I am not suggesting
that one must first rewrite the entire core to be listened to.
I am saying that with no other evidence of contribution to perl,
that someone flaming away on clpm is a troll.

I'm sorry, he hasn't earned the right to be listened to by the
perl community, and as long as all he produces are flames he
will never earn the right to be listened to.

>Look, I understand and even respect the role that reputation plays on-line
>and in free software communities, but I'd much rather see that play a
>*positive* role rather than a *negative* role.  Every time someone makes
>this argument, namely "you haven't contributed anything of value, so
>obviously your opinion isn't worth anything," it makes the community that
>much more insular and makes it that much harder for someone new who *does*
>have something to offer to get in the front door.

This could be true depending upon how rigorously one defined
`contributing'.  But I didn't suggest that the only way to
contribute was to become a porter and start hacking.  I very
clearly presented that one could contribute by hacking at the
core, by fixing the documentation, by making code available
on CPAN, or by just posting useful and thoughtful articles
to clpm.  Anybody can do one of those.  Those who don't bother
haven't `contributed anything of value' and `obviously [their]
opinion isn't worth anything'.

>Just because you've never heard of someone today doesn't mean they won't
>be of valuable assistance tomorrow.  And there are a *lot* of people who
>have given a lot of valuable work to the Perl community who *are* abrasive
>or occasionally insulting.  I'm of the opinion that while I'd rather
>everyone be polite and treat other people with respect, I'm not going to
>slam the door in someone's face just because they have a hard time with
>that.  Maybe they'll learn.  I know I certainly have learned a lot since
>the time when I first got on Usenet.

Russ, I know that you understand this point, but I need to make
it anyway.

Perl is a programming language.  Perl is a technology.  But more
than either of these Perl is a community.  There are a lot
of people who dedicate amazing amounts of their personal time and
energy to making perl successful.  For these people, Perl is
home.

Now we are being asked to admit people to our community who have
done nothing to help it.  We are being asked to be tolerant of
those who have no tolerance for us.  We are being asked to mold
our cultural and social ideals to the lowest common denominator
of idiocy just so that we can make sure that we don't accidentally
scare away someone who may one day become a valuable member
of the community.

I won't do it. Ever.  I will not just hand perl over to people
who don't care about it, who don't have anything invested
in it, and who take and take and take without ever giving
back.  I sincerely hope that I am not alone in this feeling.

One of the best things about open source in general, and 
perl in particular, is that it is possible for anyone to
contribute.  The only determining factor is the quality
of the contribution.  It doesn't matter if you are personally
extremely abusive and abrasive, it doesn't matter if you are
Mother Teresa reincarnated and always have a kind word for
everyone.  Everybody is judged solely on the technical merit
of their contributions.

We tolerate Abigail's occasional flames to newbies for
the same reason we tolerate Tom's flames, she has earned
the right to be heard.  She has earned her place in the
community regardless of whether people are offended by
her manner.

Mr. Burnore has not, and that is the way it should be.

dgris
-- 
Daniel Grisinger           dgris@perrin.dimensional.com
"No kings, no presidents, just a rough consensus and
running code."
                           Dave Clark


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

Date: Tue, 4 Aug 1998 15:58:52 +0100
From: Alan Silver <alan@find-it.furryferret.uk.com>
Subject: Re: Does anybody have a BANNER AD program?
Message-Id: <8hfr3KAsGyx1EwBm@find-it.uk.com>

In article <6q71kj$5ua$1@samsara0.mindspring.com>, Rick Ryan
<rickryan@mindspring.com> writes
>Can I use Perl to create a rotating banner ad? Does anyone have any code
>they could send? Thanks

have a look at http://www.cgi-resources.com - a source for (mostly) free
CGI scripts. I'm pretty sure there are a few of these rotating banners
scripts there.

Alan

-- 
Alan Silver
Please remove the furryferret when replying by e-mail


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

Date: Tue, 4 Aug 1998 10:43:27 -0500
From: "Rick Ryan" <rickryan@mindspring.com>
Subject: Re: Does anybody have a BANNER AD program?
Message-Id: <6q7aae$1na$1@samsara0.mindspring.com>

Thanks everyone for your responses.

Alan Silver wrote in message <8hfr3KAsGyx1EwBm@find-it.uk.com>...
>In article <6q71kj$5ua$1@samsara0.mindspring.com>, Rick Ryan
><rickryan@mindspring.com> writes
>>Can I use Perl to create a rotating banner ad? Does anyone have any code
>>they could send? Thanks
>
>have a look at http://www.cgi-resources.com - a source for (mostly) free
>CGI scripts. I'm pretty sure there are a few of these rotating banners
>scripts there.
>
>Alan
>
>--
>Alan Silver
>Please remove the furryferret when replying by e-mail




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

Date: Tue, 04 Aug 1998 07:18:36 -0800
From: address@in.sig (JJ Good)
Subject: File already opened by another process?
Message-Id: <902243828.5513@wren.supernews.com>

Is there a way in perl to check if a file is already opened by another process 
running on the system?

Thanks


   -**** Posted from Supernews, Discussions Start Here(tm) ****-
http://www.supernews.com/ - Host to the World's Discussions & Usenet


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

Date: Tue, 4 Aug 1998 11:10:15 -0400
From: kpreid@ibm.net (Kevin Reid)
Subject: Re: File problems
Message-Id: <1dd6g0l.qj7g4o1llu1lwN@slip166-72-108-139.ny.us.ibm.net>

Ophir Marko <ophir@saifun.com> wrote:

> I have a file that looks like this:
> 
> aa b ccc d
> 1 2 3 4
> 
> 
> I made a script that rearanges the file to look like this:
> aa === 1
> b === 2
> ccc === 3
> d ===4
> 
> 
> What I want to have as an output is this:
> 
> aa......1
> b.......2
> ccc.....3
> d.......4
> 
> How do I write that kind of script?
> 

#!perl -w

use constant LINEWIDTH => 20;

foreach $IN (@ARGV) {
  print "\nFile: $IN\n";

  $OUT = "> $IN.out";
  open IN  or die "can't open in: $!";
  open OUT or die "can't open out: $!";
  
  @names = split / /, <IN>;
  @values = split / /, <IN>;
  chomp $names[-1]; chomp $values[-1];
  @names == @values or die "File '$IN': Lines not same length";

  for ($i = 0; $i < @names; $i++) {
    $name = $names[$i];
    $value = $values[$i];
    print OUT $name, '.' x (LINEWIDTH - length($name.$value)), $value,
"\n";
  }
}

close IN;
close OUT;

__END__

-- 
  Kevin Reid.      |         Macintosh.
   "I'm me."       |      Think different.


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

Date: Tue, 04 Aug 1998 14:19:47 GMT
From: Darren@introdesign.com (Darren Ferguson)
Subject: File Upload with Perl
Message-Id: <35c71849.14516354@news.demon.co.uk>

Help.....

Does anyone have a simple script to upload files with perl.

my ISP won't allow me to use cgi-lib.pl

Many Thanks

Darren Ferguson
Darren@introdesign.com



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

Date: Tue, 4 Aug 1998 16:31:52 +0200
From: "Jonkers" <snif@xs4all.nonono.nl>
Subject: Re: Has anyone used the POP3 module ?
Message-Id: <6q75v7$1ug$1@news.gns.getronics.nl>

Alan Silver wrote in message ...
>In article <6q4b5p$kuq$1@news.gns.getronics.nl>, Jonkers
><snif@xs4all.nonono.nl> writes
>
>Sorry it's Alan again. A question about your script please.
>
><snip>
>>$number = $pop->login( $login , $password );
>>
>>@status = $pop->popstat();
>>
>>$number = $status[0] ;
>
>If I understand it correctly, the $pop->login() bit returns the number
>of messages in the mailbox. Why then do you need to use $pop->popstat()
>to get the number of messages ? Won't the numbers be the same ?

The Net::POP3-specifications is/was not compliant with the POP3 -RFC.
Therefore the explicit popstat() is necessary. All details in the below
corresponce betwee the Net::POP3-author Graham Barr and me.


QUOTE

Thanks for the report. Changes are already in the next release to fix
this problem. In the next release if the regexp fails the Net::POP3
will automatically call STAT and return that from login()

On Wed, May 27, 1998 at 08:43:00AM +0200, Jonkers wrote:
Hello Graham,

 Thanks for creating libnet-1.0605 and pop3.pm. It works great. However, I
 think I have found a bug in pop3.pm. The pop3.pm module says:

  =item pass ( PASS )

  Send the PASS command. Returns the number of messages in the mailbox.

 (and something similar for login().). The information "Returns the number
 of messages in the mailbox." is not always true: POP3 hosts *often* do
 send the number of messages after a successful login, but this is not
 required by RFC1081, and therefore some POP3 hosts don't do it. Quotes
 from RFC1081:

  - "and responds with a positive success indicator"
  - "+OK maildrop locked and ready" (as an example response to a successful
 PASS)

 So there is nothing in RFC1081 that says the host *must* reply to a
 successful PASS with the number of messages.

 Not very interesting, until I found a POP3 host (my own) that follows
 RFC1081 very strict and doesn't reply with the number of messages. The
 result: my perl program thought there were no messages and no messages
 were downloaded.

 It took some time to find out the reason (see above). The workaround is
 easy: after the login(), use $pop->popstat() to find the STAT with the
 number of messages. Some lines from my program:

  $pop = Net::POP3->new($pop3host);
  $number = $pop->login( $login , $password );
  @status = $pop->popstat();    <<<< new
  $number = @status[0] ;     <<<< new
  print "aantal berichten lijkt $number\n";

 Maybe it would be nice to change the pop3.pm and the example pop3
 according to this information. Changes should also be made to (maybe
 removed?):

   $me->message =~ /(\d+)\s+message/io;

   ${*$me}{'net_pop3_count'} = $1 || 0;



 Best regards,
 Sander Jonkers


 My special RFC1018-strict pop3 host (without number of messages):

 $ telnet pc-jonkerss.gen.getronics.nl 110
 Trying...
 Connected to pc-jonkerss.gen.getronics.nl.
 Escape character is '^]'.
 +OK MailBeamer v3.16 (WinNT 4.x) ready <wnt-jonkerss.gen.getronics.nl>
 USER hoi
 +OK send password now
 PASS password
 +OK logon successfull      <<<<< no numbers
 QUIT
 +OK bye
 Connection closed by foreign host.

 More common pop3 host:

 $ telnet pop.xs4all.nl 110
 Trying...
 Connected to pop.xs4all.nl.
 Escape character is '^]'.
 +OK QPOP (version 2.3-XS4ALL) at maildrop.xs4all.nl starting.
 USER snif
 +OK Password required for snif.
 PASS xxxx
 +OK snif has 0 messages (0 octets).    <<< yes, numbers as usual
 QUIT
 +OK Pop server at maildrop.xs4all.nl signing off.
 Connection closed by foreign host.
 $

  --

<snip>


/QUOTE









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

Date: Tue, 04 Aug 1998 14:56:14 GMT
From: bolesbr1@memorialmed.com
Subject: Help! Stuck with an array assignment problem
Message-Id: <6q77ee$h56$1@nnrp1.dejanews.com>

I've been having a hard time trying to grasp the concept of arrays in perl by
trying to read the faqs and previous news posts.  What I would like to do is
this:  I want to assign a whole array to one element of another array and be
able to print out the one element.  I know I need to do something like this:

$a[0]=@b;

But when I try to print out $a[0], like this:

print $a[0];

I don't get the same thing I get when I do this:

print @b;

Why is this?  I know it has something to do with referencing the array, but
I'm not sure.  If someone could give me an example or two with some
explanation, I would greatly appreciate it.  TIA!

[\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/]
[\/]Brandon Boles                 [\/]   The expressed opinion's are[\/]
[\/]Systems Administrator         [\/]    entirely my own, not of my[\/]
[\/]Memorial Medical Center       [\/]        employer or any of its[\/]
[\/]bolesbr1@memorialmed.com      [\/]                 affiliations.[\/]
[\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/]

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Tue, 4 Aug 1998 16:19:34 +0100
From: "Planet News" <guillaume@nospam.com>
Subject: Re: Help! Stuck with an array assignment problem
Message-Id: <6q78ss$4nf$1@svr-c-01.core.theplanet.net>

Well,

if you print @b it prints its content, but if you assign a variable like
that:
$a[0]= @b;

in $a[0] you get the size of the array @b like if you where using $#b.


hope this helps,

Guillaume.



>
>$a[0]=@b;
>
>But when I try to print out $a[0], like this:
>
>print $a[0];
>
>I don't get the same thing I get when I do this:
>
>print @b;
>
>Why is this?  I know it has something to do with referencing the array, but
>I'm not sure.  If someone could give me an example or two with some
>explanation, I would greatly appreciate it.  TIA!
>
>[\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/]
>[\/]Brandon Boles                 [\/]   The expressed opinion's are[\/]
>[\/]Systems Administrator         [\/]    entirely my own, not of my[\/]
>[\/]Memorial Medical Center       [\/]        employer or any of its[\/]
>[\/]bolesbr1@memorialmed.com      [\/]                 affiliations.[\/]
>[\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/][\/]
>
>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum




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

Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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

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