[13898] in Perl-Users-Digest

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

No subject found in mail header

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Nov 10 17:44:58 1999

Date: Tue, 9 Nov 1999 15:05:30 -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: <942188730-v9-i1328@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Tue, 9 Nov 1999     Volume: 9 Number: 1328

Today's topics:
        -bv switch for sendmail <mjh@me.com>
    Re: -bv switch for sendmail (Abigail)
    Re: -bv switch for sendmail <cassell@mail.cor.epa.gov>
        alarms in win32 <dthusma@home.com>
    Re: alarms in win32 (Kragen Sitaker)
    Re: Alternative to <*> lee.lindley@bigfoot.com
    Re: Batch Program Execution <cassell@mail.cor.epa.gov>
        call an other script <mlankamp@hotmail.com>
        Calling an external routine. <mike@goforgold.com>
        can per read an excel file <jazz108@yahoo.com>
    Re: can per read an excel file (d.k. henderson)
        copyleft notice? <d.learner@gte.net>
    Re: copyleft notice? (Kragen Sitaker)
    Re: create hash for db index?? <shmooth@yahoo.com>
    Re: create hash for db index?? <cassell@mail.cor.epa.gov>
    Re: Do you now an affordable Perl editor for Windows NT <gellyfish@gellyfish.com>
    Re: Dynamic Configuration File rmore1@my-deja.com
    Re: Dynamic Configuration File (Kragen Sitaker)
    Re: FAQ 4.67: How can I use a reference as a hash key?  (Andrew Johnson)
    Re: FAQ 4.67: How can I use a reference as a hash key? <sariq@texas.net>
    Re: FAQ 4.67: How can I use a reference as a hash key? lee.lindley@bigfoot.com
    Re: FAQ 4.67: How can I use a reference as a hash key? <cassell@mail.cor.epa.gov>
    Re: FAQ 4.67: How can I use a reference as a hash key? (Kragen Sitaker)
    Re: FAQs everywhere? <james_peregrino@harvard.edu>
    Re: Forum - cookies <james_peregrino@harvard.edu>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Tue, 9 Nov 1999 18:27:50 -0800
From: "John" <mjh@me.com>
Subject: -bv switch for sendmail
Message-Id: <WFZV3.11$WB3.1594@news.enterprise.net>

How do use the -bv switch to test whether an e-mail address is valid or not.
For example,

open (MAIL, "| /usr/sbin/sendmail -bv");

Can I perform an if statement on the returned message?  Also, how would I
specify the e-mail address.

Thanks in advance,
John




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

Date: 9 Nov 1999 13:41:00 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: -bv switch for sendmail
Message-Id: <slrn82gucv.6es.abigail@alexandra.delanet.com>

John (mjh@me.com) wrote on MMCCLXII September MCMXCIII in
<URL:news:WFZV3.11$WB3.1594@news.enterprise.net>:
`` How do use the -bv switch to test whether an e-mail address is valid or not.
`` For example,
`` 
`` open (MAIL, "| /usr/sbin/sendmail -bv");
`` 
`` Can I perform an if statement on the returned message?  Also, how would I
`` specify the e-mail address.


sendmail questions are better asked in a group dealing with sendmail.

This group doesn't.


As for the general question about valid email addresses, see the FAQ,
and see RFC::RFC822::Address.


Abigail
-- 
perl -we '$_ = q ;4a75737420616e6f74686572205065726c204861636b65720as;;
          for (s;s;s;s;s;s;s;s;s;s;s;s)
              {s;(..)s?;qq qprint chr 0x$1 and \161 ssq;excess;}'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Tue, 09 Nov 1999 11:58:00 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: -bv switch for sendmail
Message-Id: <38287CC8.A955A0E2@mail.cor.epa.gov>

John wrote:
> 
> How do use the -bv switch to test whether an e-mail address is valid or not.
> For example,
> 
> open (MAIL, "| /usr/sbin/sendmail -bv");
> 
> Can I perform an if statement on the returned message?  Also, how would I
> specify the e-mail address.

You use -bv and specify the address just as if you were sending
an e-mail [without -bv of course].  But this is really a
question for the sendmail newsgroup if you want to know about
how sendmail handles this.

ObPerl: I would use Tom Christiansen's ckaddr program to
check e-mail addresses, rather than a pipe to sendmail.
how do you plan to do this for a list of addresses?  How are
you going to get the return values back when you have opened
the pipe in one direction only?  [There are ways to do this
in Perl, but you should really decide if you *need* to
first.]

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Tue, 09 Nov 1999 19:11:34 GMT
From: Darrin H <dthusma@home.com>
Subject: alarms in win32
Message-Id: <38287584.CB1454FD@home.com>

anyone got any examples of timeout/alarms in win32 for perl?

this is NP in unix, but I can't figure it out on windows.



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

Date: Tue, 09 Nov 1999 23:04:54 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: alarms in win32
Message-Id: <qM1W3.61847$23.2390296@typ11.nn.bcandid.com>

In article <38287584.CB1454FD@home.com>,
Darrin H  <dthusma@home-del.com> wrote:
>anyone got any examples of timeout/alarms in win32 for perl?
>
>this is NP in unix, but I can't figure it out on windows.

Not only is it NP, it is O(1).
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08.  Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: 9 Nov 1999 16:54:25 GMT
From: lee.lindley@bigfoot.com
Subject: Re: Alternative to <*>
Message-Id: <809jk1$39j$1@rguxd.viasystems.com>

Martien Verbruggen <mgjv@comdyn.com.au> wrote:
:>The perldelta for 5.005 does not mention this anymore. This very
:>likely means that 5.005+ does not use the shell anymore (someone
:>correct me if I'm wrong). That may just be what could solve your
:>problem. Get them to install perl 5.005_03.

I saw evidence that 5.005_03 compiled the way that I compiled it
under Solaris 2.5.1 was still using csh to do the globs.  I think the
evidence was a glob on a really large directory exceeded a csh
limitation, but I don't remember the details.  However,

truss -f perl -e 'glob("*.pl")'
[snip a bunch]
9220:   fork()                                          = 9222
9222:   fork()          (returning as child ...)        = 9220
9222:   getpid()                                        = 9222 [9220]
9222:   creat64("/dev/null", 0666)                      = 3
9222:   fcntl(2, F_GETFD, 0x00000000)                   = 0
9222:   close(2)                                        = 0
9222:   fcntl(3, F_DUPFD, 0x00000002)                   = 2
9222:   close(3)                                        = 0
9222:   brk(0x0003A280)                                 = 0
9222:   brk(0x0003A680)                                 = 0
9222:   brk(0x0003AA80)                                 = 0
9222:   execve("/usr/bin/csh", 0x000399AC, 0x000399C8)  argc = 3
[snip the rest]

tells a more exact story.

-- 
// Lee.Lindley   /// I used to think that being right was everything.
// @bigfoot.com  ///  Then I matured into the realization that getting
////////////////////   along was more important.  Except on usenet.


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

Date: Tue, 09 Nov 1999 11:45:15 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Batch Program Execution
Message-Id: <382879CB.399F078D@mail.cor.epa.gov>

Vijay N Rao wrote:
> 
> Thanks David.
> Yeh considering your suggestion, I have this question. I need to continously do
> FTP from a PC to a host. Is this possible using perl?

Yes.  But are you sure this is what you want?  Is it more
likely that you need regular checks to the host machine?
My PSI::ESP module is suggesting that you may not have worked
through the details of your problem, and that you don't need
a continuous connection, just a frequent one.

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Tue, 9 Nov 1999 20:54:38 +0100
From: "Michiel Lankamp" <mlankamp@hotmail.com>
Subject: call an other script
Message-Id: <38287c0c$0$30402@reader1.casema.net>

How do I call a perl-script from an other perlscript and put the output of
the script in a string?

Thankz




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

Date: Tue, 9 Nov 1999 11:30:09 -0800
From: "Mike Bowie - Go For Gold" <mike@goforgold.com>
Subject: Calling an external routine.
Message-Id: <s2gtd4t86i738@corp.supernews.com>

I want to have a sparate file for each 'page' that my script calls.

What do I need to put in 'master.pl' and 'slave'pl' to enable my to call a
routine in slave from within master?

Thanks,

Mike.




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

Date: Tue, 09 Nov 1999 20:28:52 GMT
From: "n.thiyagarajan" <jazz108@yahoo.com>
Subject: can per read an excel file
Message-Id: <3828875D.73BB86CB@yahoo.com>

hi everybody...

i need to write a script that can read an excel file...
anybody know what format excel files are in.
any ideas

thanks
jazz108@yahoo.com




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

Date: Tue, 09 Nov 1999 22:04:30 GMT
From: dalekh@hotmail.com (d.k. henderson)
Subject: Re: can per read an excel file
Message-Id: <8E79AE301dkhenderson@207.14.236.133>


You can use an ODBC module to read the spreadsheet values. Search on ODBC at 
www.cpan.org


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

Date: Tue, 09 Nov 1999 17:45:36 GMT
From: "Donald \"Don\" Learner" <d.learner@gte.net>
Subject: copyleft notice?
Message-Id: <45ZV3.316$QY4.11928@dfiatx1-snr1.gtei.net>

I have come across a reference in a database textbook about Perl being "the
only software product on the market to have a copyleft notice." What does
this mean? I have looked in several books but can not find it as a command
or reserved word. Thanks!




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

Date: Tue, 09 Nov 1999 21:49:58 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: copyleft notice?
Message-Id: <aG0W3.61743$23.2379325@typ11.nn.bcandid.com>

In article <45ZV3.316$QY4.11928@dfiatx1-snr1.gtei.net>,
Donald \"Don\" Learner <d.learner@gte.net> wrote:
>I have come across a reference in a database textbook about Perl being "the
>only software product on the market to have a copyleft notice." What does
>this mean? I have looked in several books but can not find it as a command
>or reserved word. Thanks!

Four people answered you when you posted this yesterday.
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08.  Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: Tue, 09 Nov 1999 19:14:07 GMT
From: Shmooth <shmooth@yahoo.com>
Subject: Re: create hash for db index??
Message-Id: <3828733C.D2AC5429@yahoo.com>

I probably should not have mentioned what exactly I intended to use this
'unique key' for.  I'm already using Oracle sequences extensively, but I'm
working on a 'hack' to up performance during a multi-table
select/insert/update.  Up until now I've been using a 'sampling' of data
from the pk of the record, but I thought there might be a better way.

Martien Verbruggen wrote:

> [If you hadn't removed the attribution, maybe you would have spelled
> Abigail's name correctly.]
>
> On Sat, 30 Oct 1999 01:01:27 GMT, Shmooth <shmooth@yahoo.com> wrote:
> > >
> > > Perhaps if you need to do something with Oracle, you would have to
> > > make yourself familiar with it?
> > >
> >
> > it's called overstatement, Abiguile.  Most programmers I know are
> > familiar with _it_...
>
> And most programmers I know wouldn't dream of not using the RDBMS they
> are working with to create unique indexes. That's part of the database's
> job.  Besides, if they're in a database table, they already have a
> unique key.
>
> Abigail was entirely correct to point out to you that before working
> with a database system, you should at least familiarise yourself with it
> a bit.
>
> Martien
> --
> Martien Verbruggen              |
> Interactive Media Division      | Hi, Dave here, what's the root
> Commercial Dynamics Pty. Ltd.   | password?
> NSW, Australia                  |



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

Date: Tue, 09 Nov 1999 12:08:32 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: create hash for db index??
Message-Id: <38287F40.1E2C2F6F@mail.cor.epa.gov>

Shmooth wrote:
> 
> I probably should not have mentioned what exactly I intended to use this
> 'unique key' for.  I'm already using Oracle sequences extensively, but I'm
> working on a 'hack' to up performance during a multi-table
> select/insert/update.  Up until now I've been using a 'sampling' of data
> from the pk of the record, but I thought there might be a better way.

I hope you meant that you *should* have mentioned your intent.
The experts in this newsgroup provide much more useful info
when they know more about the problem.

If the bottleneck is re-establishing the connection to your 
database each time, there are ways of maintaining the connection
and queuing the requests.  If the bottleneck is the updates
within Oracle, then you may get better advice in one of the
Oracle-related newsgroups.

HTH,
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: 9 Nov 1999 21:34:17 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Do you now an affordable Perl editor for Windows NT
Message-Id: <80a40p$h94$1@gellyfish.btinternet.com>

On Mon, 8 Nov 1999 06:49:02 -0500 travis@entropy.atlantic.net wrote:
> I belive code magic is available as freeware.
> See http://www.petes-place.com
> 

You do realise that this thread started on 28 September and that this
now is the fourth time now that I have had to point out :

   <http://www.perl.com/reference/query.cgi?editors>

Unfortunately this really has now turned into a long boring thread of
editor advocacy .

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


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

Date: Tue, 09 Nov 1999 18:15:27 GMT
From: rmore1@my-deja.com
Subject: Re: Dynamic Configuration File
Message-Id: <809obq$864$1@nnrp1.deja.com>

In article <Pine.GSO.4.10.9911051313050.29670-
100000@user2.teleport.com>,
  Tom Phoenix <rootbeer@redcat.com> wrote:
> On Fri, 5 Nov 1999 rmore1@my-deja.com wrote:
>
> > I was wondering what is the best method for accessing a
configuration
> > file ...
>
> Define "best". What's best for me may not be best for you, and
there's no
> point in any of us wasting our time until you can say just what you
want.
>
> You may need to choose among fastest, most memory efficient, easiest
to
> program, fewest lines of code, most robust, most portable, easiest to
> debug, easiest to maintain, most like your other favorite programming
> languages, or perhaps you mean some other criterion. (Of course, one
> solution may fall into more than one of these categories.)
>

Fair enough.  Here are my guesses...

fastest.....................2a ( doesn't look at @INC )
most memory efficient.......2a/2
easiest to program..........2a ( what could be simpler $GLOBAL1="hello"
)
fewest lines of code........2a ( "", no module code )
most robust.................1a/3 (1?)
most portable...............1a
most maintainable...........1a/3


Option 1:
===========
use lib "$ENV{CONF_DIR}";
use MyConfig;

+ It's a module
- Can't link directly to a file

Option 1a:
==========
csh> setenv PERL5LIB CONF_DIR

use MyConfig;

+ Saves a line in the code.
+ More elegant?
- Slower. This directory will be 'stat'ed first for all libs.


Option 2:
===========
use vars qw ( %GLOBAL1 );
require "$ENV{CONF_DIR}/MyConfig.pl";


+ Can directly link to a file
- Need to store everything in a hash and declare the hash global
  or
  Change the 'use vars' for each global you would like to use

Option 2a:
===========
use vars qw ( %GLOBAL1 );
do "$ENV{CONF_DIR}/MyConfig.pl";

Same as option 2, but I thought 'do' was obsoleted and 'require' is now
preferred,
although a lot of scripts I've seen still use 'do'

Option 3:
==========
use App::Config;

http://search.cpan.org/doc/ABW/App-Config-1.09/Config.pm


--
=============================
Richard More
http://www.richmore.com/


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Tue, 09 Nov 1999 21:43:30 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Dynamic Configuration File
Message-Id: <6A0W3.61740$23.2378390@typ11.nn.bcandid.com>

In article <809obq$864$1@nnrp1.deja.com>,  <rmore1@my-deja.com> wrote:
>In article <Pine.GSO.4.10.9911051313050.29670-
>100000@user2.teleport.com>,
>Fair enough.  Here are my guesses...
>
>fastest.....................2a ( doesn't look at @INC )
>most memory efficient.......2a/2
>easiest to program..........2a ( what could be simpler $GLOBAL1="hello"
>)
>fewest lines of code........2a ( "", no module code )
>most robust.................1a/3 (1?)
>most portable...............1a
>most maintainable...........1a/3

You may get some benefit (security, maintainability, interoperability
with other programs, usability, efficiency, ability to rewrite your
program in a language other than Perl) from using a simpler
configuration file format.
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08.  Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: Tue, 09 Nov 1999 17:23:05 GMT
From: andrew-johnson@home.com (Andrew Johnson)
Subject: Re: FAQ 4.67: How can I use a reference as a hash key?  
Message-Id: <ZLYV3.1204$Zu4.25496@news1.rdc1.mb.home.com>

In article <pYXV3.60894$23.2339952@typ11.nn.bcandid.com>,
 Kragen Sitaker <kragen@dnaco.net> wrote:
[snip] 
! This appears to work fine.  What do you mean, you can't do it?  The
! references get stringified, don't they?

yes, but that's exactly the point ... once stringified into a key
it is no longer a reference. With the Tie::RefHash module you can
indeed use a reference as a hash key and still use the key as a
reference:

#!/usr/bin/perl -w
use strict;
use Tie::RefHash;
my %hash;
tie %hash, 'Tie::RefHash';
my $key = [1,42,3];
$hash{$key} = 'foo';
for(keys %hash){
    print "$_\n";
    print $_->[1],"\n";
    print "$hash{$key}\n";
}

andrew

-- 
Andrew L. Johnson   http://www.manning.com/Johnson/
      They're not soaking, they're rusting!
          -- my wife on my dishwashing habits
      


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

Date: Tue, 09 Nov 1999 11:43:14 -0600
From: Tom Briles <sariq@texas.net>
Subject: Re: FAQ 4.67: How can I use a reference as a hash key?
Message-Id: <38285D32.57E49429@texas.net>

Kragen Sitaker wrote:
> 
> In article <38279f7e@cs.colorado.edu>,
> Tom Christiansen  <perlfaq-suggestions@perl.com> wrote:
> >  How can I use a reference as a hash key?
> >
> >    You can't do this directly, but you could use the standard
> >    Tie::Refhash module distributed with perl.
> 
> #!/usr/bin/perl -w
> my ($a, $b);
> my ($x, $y) = \($a, $b);
> @z{$x, $y} = qw(bibi baba);
> print map { "$_ => $z{$_}\n" } \($a, $b);
> 
> This appears to work fine.  What do you mean, you can't do it?  The
> references get stringified, don't they?

Yep.  Which means they're no longer references, right?

- Tom


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

Date: 9 Nov 1999 18:14:07 GMT
From: lee.lindley@bigfoot.com
Subject: Re: FAQ 4.67: How can I use a reference as a hash key?
Message-Id: <809o9f$4di$1@rguxd.viasystems.com>

Kragen Sitaker <kragen@dnaco.net> wrote:
:>In article <38279f7e@cs.colorado.edu>,
:>Tom Christiansen  <perlfaq-suggestions@perl.com> wrote:
:>>  How can I use a reference as a hash key?
:>>
:>>    You can't do this directly, but you could use the standard
:>>    Tie::Refhash module distributed with perl.

:>#!/usr/bin/perl -w
:>my ($a, $b);
:>my ($x, $y) = \($a, $b);
:>@z{$x, $y} = qw(bibi baba);
:>print map { "$_ => $z{$_}\n" } \($a, $b);

:>This appears to work fine.  What do you mean, you can't do it?  The
:>references get stringified, don't they?

Yep.  They get stringified.  So they aren't references anymore and
the answer is technically correct, albeit, easily misinterpreted.

for my $key (keys %z) {
	print $$key; # Wouldn't work even if $a and $b had values
}



-- 
// Lee.Lindley   /// I used to think that being right was everything.
// @bigfoot.com  ///  Then I matured into the realization that getting
////////////////////   along was more important.  Except on usenet.


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

Date: Tue, 09 Nov 1999 11:54:12 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: FAQ 4.67: How can I use a reference as a hash key?
Message-Id: <38287BE4.3891B0BE@mail.cor.epa.gov>

Andrew Johnson wrote:
> 
> In article <pYXV3.60894$23.2339952@typ11.nn.bcandid.com>,
>  Kragen Sitaker <kragen@dnaco.net> wrote:
> [snip]
> ! This appears to work fine.  What do you mean, you can't do it?  The
> ! references get stringified, don't they?
> 
> yes, but that's exactly the point ... once stringified into a key
> it is no longer a reference. With the Tie::RefHash module you can
> indeed use a reference as a hash key and still use the key as a
> reference:
[snip of code]

Right.  So the problem is that the FAQ is not sufficiently clear
on the point.  As Kragen indicated.  Who's going to submit
a patch to the FAQ?

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Tue, 09 Nov 1999 21:48:47 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: FAQ 4.67: How can I use a reference as a hash key?
Message-Id: <3F0W3.61741$23.2378939@typ11.nn.bcandid.com>

In article <38287BE4.3891B0BE@mail.cor.epa.gov>,
David Cassell  <cassell@mail.cor.epa.gov> wrote:
>Right.  So the problem is that the FAQ is not sufficiently clear
>on the point.  As Kragen indicated.  Who's going to submit
>a patch to the FAQ?

Is .pod the source format for the FAQ, or is it translated to .pod from
some other format?
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08.  Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: 09 Nov 1999 16:29:27 -0500
From: James Peregrino <james_peregrino@harvard.edu>
Subject: Re: FAQs everywhere?
Message-Id: <x71z9z2w20.fsf@bert.dce.harvard.edu>

lee.lindley@bigfoot.com writes:

> They provide some added value to the NG, but it is rude and arrogant
> that he posts them and yet does not take responsibility for it by
> participating in the c.l.p.misc fray.

	Tom's participated for untold years and his answers live on in sites
that have archived Usenet.  I consider this 'participating-at-a-distance' :-)

> Whatever the reasons, there was never a consensus that these postings
> were welcome on c.l.p.misc and therefore it is by definition an
> imposition on the NG.

	Alas there are many impositions on the NG, most of which are
failures to read the FAQs of Perl and Usenet.

	Subject: Help! Newbie wants you to write my perl script!


And so that now individual FAQ questions get indexed instead of indexing
a massive FAQ file, when you search the NG using something like dejanews,
you'll often get a helpful FAQ entry along with an answer to your question.

>  Since these posts are consistent in the
> Subject line, they are easy to ignore and so it is only a minor
> imposition.

	Tom's pretty big on people being able to configure their news reader
and using a decent news reader.

> (And I do not object as much as it may appear that I do
> from this post.)

	No problemo.  I'll forget this as soon as I finish typi. .   .

-James
-- 
James Peregrino
Harvard Div. Continuing Education


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

Date: 09 Nov 1999 16:19:20 -0500
From: James Peregrino <james_peregrino@harvard.edu>
Subject: Re: Forum - cookies
Message-Id: <x74sev2wiv.fsf@bert.dce.harvard.edu>

"Mark Grocock" <mark@mgrocock.freeserve.co.uk> writes:

> I have written a forum script in Perl and would like to know how to use
> cookies so that the page created by the script only shows messages the user
> hasn't already seen. If you want a copy of the script email me and I will
> send it to you.

	Recommend using CGI.pm to handle the cookies.  Then,

1) test to see if the browser returned the cookie.
2) If not, create a cookie and give it to the browser
3) If it is returning a cookie, then everytime you display a message on 
your forum, also send a cookie which saves that message number.

	How you construct the value of this cookie is up to you.  Off the
top of my head

cookie name = forumseen

value = 13+24+49+4

would represent having seen messages 13, 24, 49 and 4

Give the cookie an expiration date well into the future (like a year).
-James

-- 
James Peregrino
Harvard Div. Continuing Education


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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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 V9 Issue 1328
**************************************


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