[13680] in Perl-Users-Digest
Perl-Users Digest, Issue: 1090 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Oct 15 23:05:28 1999
Date: Fri, 15 Oct 1999 20:05:09 -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: <940043109-v9-i1090@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Fri, 15 Oct 1999 Volume: 9 Number: 1090
Today's topics:
Re: "Protecting" Perl source code (Kragen Sitaker)
Re: and versus && <makkulka@cisco.com>
Re: and versus && (Abigail)
Re: and versus && (Matthew Bafford)
Re: and versus && <ltl@rgsun40.viasystems.com>
Annoying error: "Args must match #! line" <*@qz.to>
Re: Annoying error: "Args must match #! line" (Ilya Zakharevich)
Assistance required, please help... <hobbes@MailAndNews.com>
Automated account/password creation un*x slimbob@my-deja.com
Re: CSS / NETSCAPE -> Through PERL <thomas@firstpoint.se>
detailed problem (Max)
Re: encryption and crypt() ? <dtbaker_@busprod.com>
Re: getting variables embeded in string to be evaluated <skilchen@swissonline.ch>
Re: help, im a perl dummy (Tad McClellan)
HELP: h2xs changes in 500503? hoeffelt@chiron.com
Re: HELP: h2xs changes in 500503? (Ilya Zakharevich)
Re: how does her butt taste? (Tad McClellan)
Re: How to inquire, position and click the mouse in PER (Nim Chu)
How to socket <choigo7@hitel.net>
Newbie Question: XS <jivens@lpl.arizona.edu>
Newbie XS Question <jivens@lpl.arizona.edu>
offtopic web transactions was [Re: What is best..?] <ltl@rgsun40.viasystems.com>
Re: pod2html: simple how-to question <randy@theory.uwinnipeg.ca>
Re: Proper way to test if a hash key's value is defined (Ghost)
Re: tr// question <pooka@cygnus.ucdavis.edu>
Re: tr// question <pooka@cygnus.ucdavis.edu>
Re: tr// question <pooka@cygnus.ucdavis.edu>
Re: tr// question <uri@sysarch.com>
Re: What is best..? (Abigail)
Re: What is best..? <atif@developer.ch>
Re: Writing an IMAP Client (Kragen Sitaker)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 16 Oct 1999 02:38:58 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: "Protecting" Perl source code
Message-Id: <6zRN3.7483$E_1.414980@typ11.nn.bcandid.com>
In article <9BKN3.252$cF.192@198.235.216.4>,
Craig Vincent <webmaster@webdream.com> wrote:
>Do you have any ideas or suggestions for protection features I could
>put into place to help minimize the damage done by people pirating my
>scripts?
Put it on your web site for anyone to download and release it under the
GNU General Public License. Then nobody will be able to "pirate" your
scripts, unless they use them in proprietary software of their own.
(If you're worried about that, you could use a more liberal license
that allows that too.)
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
Tue Oct 12 1999
28 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Fri, 15 Oct 1999 17:36:23 -0700
From: Makarand Kulkarni <makkulka@cisco.com>
Subject: Re: and versus &&
Message-Id: <3807C887.41B4643@cisco.com>
"R. McGillis" wrote:
> I was taught that "and" is just a short cut for "&&" to improve
> readability, but otherwise interchangable. A colleague of mine just told
> me that there is a subtle difference, but could not remember what it was.
> What's the scoop? Is there any difference between them in how they work?
Right from perldoc perlop
--
The precedence of "and" and "or" is much lower, however, so that
you can safely use them after a list operator without the
need for parentheses:
--
------------------------------
Date: 15 Oct 1999 20:19:40 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: and versus &&
Message-Id: <slrn80fkkp.q8s.abigail@alexandra.delanet.com>
R. McGillis (rmcgilli@popmail.ucsd.edu) wrote on MMCCXXXVI September
MCMXCIII in <URL:news:rmcgilli-1510991658240001@cul89-158.ucsd.edu>:
<> I was taught that "and" is just a short cut for "&&" to improve
<> readability, but otherwise interchangable. A colleague of mine just told
<> me that there is a subtle difference, but could not remember what it was.
<> What's the scoop? Is there any difference between them in how they work?
Is there anything in the manual about `&&' and `and' that you didn't
understand, or are you just to lazy to read?
In the latter case, posting an answer would be pointless.
Abigail
--
srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
//=>"IGrACVGQ\x02GJCWVhP\x02PL\x02jNMP"));print+(map{$_^q^"^}@[),"\n"
-----------== 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: Sat, 16 Oct 1999 01:41:53 GMT
From: *@dragons.duesouth.net (Matthew Bafford)
Subject: Re: and versus &&
Message-Id: <slrn80fjqk.32t.*@dragons.duesouth.net>
On Fri, 15 Oct 1999 16:58:24 -0700, rmcgilli@popmail.ucsd.edu (R.
McGillis) enriched us with:
: I was taught that "and" is just a short cut for "&&"
[snip]
: What's the scoop? Is there any difference between them in how they work?
precedence
man perlop
...
[snip 14 lines]
left &&
left ||
[snip 6 lines]
left and
left or xor
...
with the operator higest on the list having the highest precedence.
---
What this means is statements like:
open FILE, "file" || die;
bind to:
open FILE, ("file" || die);
and:
open FILE, "file" or die;
binds to:
(open FILE, "file") || die;
---
A common gotcha with using C<and> or C<or> exclusively is:
$a = $b or $c;
which binds to:
($a = $b) || $c;
rather than the desired:
$a = ($b || $c);
---
If in doubt, refer the the table in perlop.
Also, if you're unsure how a particular construct is being parsed, try it
out:
> perl -MO=Deparse,-p -e '$a = $b or $c;' -e '$a = $b || $c;'
-e syntax OK
(($a = $b) or $c);
($a = ($b || $c));
>
B::Deparse comes with fairly recent Perls.
---
C<and> or C<or> are never necessary. You can always use parentheses to
change precedence.
: Thanks.
HTH,
: -R.M.
--Matthew
------------------------------
Date: 16 Oct 1999 02:05:01 GMT
From: lt lindley <ltl@rgsun40.viasystems.com>
Subject: Re: and versus &&
Message-Id: <7u8mgd$21p$1@rguxd.viasystems.com>
R. McGillis <rmcgilli@popmail.ucsd.edu> wrote:
:>I was taught that "and" is just a short cut for "&&" to improve
:>readability, but otherwise interchangable.
Close enough for horseshoes, but not quite for a syntax.
:> A colleague of mine just told
:>me that there is a subtle difference, but could not remember what it was.
:>What's the scoop? Is there any difference between them in how they work?
precedence.
If you use enough parens, you may never need to learn all of the
precedence rules. :-) But if you want to understand the difference
between '&&' and 'and', you will need to study the `perldoc perlop`
manual page.
The standard example is:
open(FH,"somefile") || die "failed open somefile: $!";
open FH, "somefile" or die "failed open somefile: $!";
Look in the table for the precedence of "," vs "||" vs "or", and then
you may get a clue about why the parens are required in the first
example, but not required in the second.
Frankly, I think it is one of those times where "there are too
many ways to do it." TATMWTDOI cannot be original. Please tell
me that this has been been beaten to death somewhere. A search
on deja does not turn up anything to disabuse me of my smugness.
Surely there is a clpm denizen somewhere who can tell me that they
have seen that knock on Perl before. Otherwise, I may have to
slap a copyleft on it. ;->
--
// 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: 16 Oct 1999 00:51:20 GMT
From: Eli the Bearded <*@qz.to>
Subject: Annoying error: "Args must match #! line"
Message-Id: <eli$9910152020@qz.little-neck.ny.us>
Under some circumstances perl gets very anal-retentive about the
command line arguments. I can understand that this might be very
good for some things, but I find it extremely annoying for one
specific case.
Perl gets anal about the command line arguments matching when
the script is suid or sgid. The case that it bothers me so much
for is when I want to do a -c check of the script and must edit
it to put in -c to do the check, then edit it again to remove
the -c to run it.
Here's an example:
$ ls -l index.cgi
-rwsr-xr-x 1 eli www 8687 Oct 15 18:03 index.cgi
$ perl -Twc index.cgi
Args must match #! line at index.cgi line 1.
$ head -1 index.cgi
#! /usr/bin/perl -Tw
I know BEGIN and END blocks get executed even when using the
check mode (-c), but if the suid/sgid would be a no-op (files
owned by the person running them) or if the account doing the
check is already the superuser, the command line matching
issue is irrelevant.
Would someone consider taking out the check for this case?
Elijah
------
or is there still a security issue I don't see?
------------------------------
Date: 16 Oct 1999 02:13:06 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Annoying error: "Args must match #! line"
Message-Id: <7u8mvi$9um$1@charm.magnus.acs.ohio-state.edu>
[A complimentary Cc of this posting was sent to Eli the Bearded
<*@qz.to>],
who wrote in article <eli$9910152020@qz.little-neck.ny.us>:
> $ perl -Twc index.cgi
> Args must match #! line at index.cgi line 1.
> $ head -1 index.cgi
> #! /usr/bin/perl -Tw
Does not it work with
perl -Tw -c index.cgi
?
Ilya
------------------------------
Date: Fri, 15 Oct 1999 21:41:58 -0400
From: Hobbes <hobbes@MailAndNews.com>
Subject: Assistance required, please help...
Message-Id: <3808F338@MailAndNews.com>
Hello,
I am having trouble with checkboxes. Can someone please help me? Email me
and
I will give you the details of my problem.
Jason
------------------------------
Date: Sat, 16 Oct 1999 00:55:09 GMT
From: slimbob@my-deja.com
Subject: Automated account/password creation un*x
Message-Id: <7u8idb$f1s$1@nnrp1.deja.com>
Howdy:
I need to automate the addition of testing
accounts to some of our unix boxes, running either solaris or redhat
linux.
The idea is that each qa engineer will have one hundred accounts
associated with their login name, so that bill will have bill[0..99].
Right
now I'm building up a /usr/sbin/useradd command line, and then calling
it through perl's system(). This neatly adds the accounts and the
relevant information, but doesn't help with the /etc/shadow password
creation. I don't need a particular password, just something unique that
I can then email to the engineers. Any idea how to best automate this
part of the process?
your help appreciated,
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Sat, 16 Oct 1999 01:51:17 +0200
From: "Thomas" <thomas@firstpoint.se>
Subject: Re: CSS / NETSCAPE -> Through PERL
Message-Id: <7u8g49$4b$1@zingo.tninet.se>
hi,
1.if you are linking to external JS / CSS sources like;
<SCRIPT SRC="js.pl"> or <style src="css.pl">
you MUST make sure the correct headers are being sent along.
IE mostly recognizes things by the file-extensions or its inline origin.
but Netsape on the other hand *correctly*
does it from the content-type header.
with PERL, start your output session by telling STDOUT;
print "Content-Type: application/x-javascript\n\n";
or;
print "Content-Type: text/css\n\n";
2. Check your HTML syntax, IE allows sloppy coding, ehh, take no
offence...:))
while Netscape indeed does not, especially when it comes to layer-content.
ok, hope this helps...
thomas(at)firstpoint(dot)se
---------------------------------------
RLD skrev i meddelandet <7u86mv$313$1@fir.prod.itd.earthlink.net>...
>Ran across a strange problem that maybe someone can give me some direction
>with...
>
>Created a template file that uses CSS and JavaScript. The layers are
tables
>that are displayed depending on what button is clicked. The template works
>fine when loaded in both Netscape and IE. However... when I run my Perl
>script which opens the template and then displays it... only IE displays it
>correctly with full functionality. Netscape on the other hand just sits
>there, the calls to the JavaScript ing... seems to produce no output... it
>is not hiding the tables and making visible the one chosen.
>
>Is there something in the headers possibly that is not going over well with
>Netscape? I've used JavaScript in this manner before, but never with CSS
>... could there be a problem with styles not loading correctly when the
>output comes through a Perl script? I'm stumped.
>Please help,
>Randall
------------------------------
Date: Sat, 16 Oct 1999 00:23:51 GMT
From: nihilist@kenobiz.com (Max)
Subject: detailed problem
Message-Id: <3807c30f.258252904@news.acronet.net>
ok, i made some changes, the source code exists here:
http://www.kenobiz.com/problem.txt
alright, i uploaded the yes no and total .txt files and the
permissions are correct
when i run the script and pass hoke being equal to yes the script
increments the yes file by one and also the total file, however it
never increments them again no matter how many times i try
and when no is passed to it, it doesnt do anything
actually, when you access the script and give it nothing at all, no
yes or no it still adds one to the yes.txt and to the total.txt
when i substitute my == for the eq i get a 500 server error
------------------------------
Date: Fri, 15 Oct 1999 19:18:36 -0500
From: Dan Baker <dtbaker_@busprod.com>
Subject: Re: encryption and crypt() ?
Message-Id: <3807C45C.B485E10D@busprod.com>
A simple script I have been trying to use to generate some encrypted
passwords for a htaccess file fails when using the documented crypt()
function with the warning that "this function is unimplemented due to
excessive paranoia."
I have the precompiled 5.004 standard version from CPAN, running on
windows 95. Is the perl source for crypt() available as an "extra"
somewhere on CPAN that I missed it?
I found a ton of crypt modules, and looked at the readmes on several,
which said that they needed crypt-UFC and other libs I dont have... I
just need to generate the encrypted passwords in the format that the
average webserver running htaccess will understand it.
HELP
please let me know what module will work for generating the htaccess
style encrypted passwords.
Dan
------------------------------
Date: Sat, 16 Oct 1999 00:15:54 GMT
From: "Samuel Kilchenmann" <skilchen@swissonline.ch>
Subject: Re: getting variables embeded in string to be evaluated
Message-Id: <_sPN3.24866$m4.90070035@news.magma.ca>
Marcel Grunauer <marcel.grunauer@lovely.net> wrote in:
news:ickHOHxkqNfOdJPW5D844wwlxWar@4ax.com
> On Fri, 15 Oct 1999 23:40:23 GMT, "Samuel Kilchenmann"
> <skilchen@swissonline.ch> wrote:
>
> > > $_="hello YYY world\n";
> > > s/YYY/\$ref\{CC\}/;
> > > $arr[0] = "$_";
> > > $ref{CC} = "there";
> > > print $arr[0];
> > > print "$arr[0]";
> > >
> > print eval qq("$arr[0]");
>
> That's *two* levels of quoting too much.
>
Not really:
print eval qq("$arr[0]");
gives:
hello there world
as requested, while
print eval $arr[0]
gives:
Bareword found where operator expected at (eval 2) line 1, near "}
world"
(Missing operator before world?)
Unquoted string "world" may clash with future reserved word at (eval 2)
line 3.
------------------------------
Date: Fri, 15 Oct 1999 15:33:31 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: help, im a perl dummy
Message-Id: <biv7u7.f56.ln@magna.metronet.com>
Max (nihilist@kenobiz.com) wrote:
: ok, how do i make perl round a number the tenths decimal place?
Perl FAQ, part 4:
"Does perl have a round function?
What about ceil() and floor()?
Trig functions?"
HTH
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 15 Oct 1999 23:57:17 GMT
From: hoeffelt@chiron.com
Subject: HELP: h2xs changes in 500503?
Message-Id: <7u8f0o$cqb$1@nnrp1.deja.com>
Has h2xs changed between 500502 and 500503?
the 500502 version produced the following Autoload subroutine:
sub AUTOLOAD {
# This AUTOLOAD is used to 'autoload' constants from the constant()
# XS function. If a constant is not found then control is passed
# to the AUTOLOAD in AutoLoader.
my $constname;
($constname = $AUTOLOAD) =~ s/.*:://;
croak "& not defined" if $constname eq 'constant';
my $val = constant($constname, @_ ? $_[0] : 0);
if ($! != 0) {
if ($! =~ /Invalid/) {
$AutoLoader::AUTOLOAD = $AUTOLOAD;
goto &AutoLoader::AUTOLOAD;
}
else {
croak "Your vendor has not defined DayPerl macro
$constname";
}
}
#no strict 'refs';
eval "sub $AUTOLOAD { $val }";
goto &$AUTOLOAD;
}
the 500503 version produced the exact same subroutine code except
the 2nd to last line, eval... became:
*$AUTOLOAD = sub () { $val };
The later did not work, iving a "prototype mismatch" err. what is this
contruct doing? should it have worked.
any explanation would be greatly appreciated.
Thomas
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 16 Oct 1999 02:10:57 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: HELP: h2xs changes in 500503?
Message-Id: <7u8mrh$9t7$1@charm.magnus.acs.ohio-state.edu>
[A complimentary Cc of this posting was sent to
<hoeffelt@chiron.com>],
who wrote in article <7u8f0o$cqb$1@nnrp1.deja.com>:
> the 500503 version produced the exact same subroutine code except
> the 2nd to last line, eval... became:
>
> *$AUTOLOAD = sub () { $val };
>
> The later did not work, iving a "prototype mismatch" err. what is this
> contruct doing? should it have worked.
"did not work"?! I doubt it very much. It was giving an annoying
warning until very recently, that's right. Lemme see... The h2xs of
just released 5.005_62 produces
# Fixed between 5.005_53 and 5.005_61
if (\$] >= 5.00561) {
*\$AUTOLOAD = sub () { \$val };
}
else {
*\$AUTOLOAD = sub { \$val };
}
Ilya
------------------------------
Date: Fri, 15 Oct 1999 15:27:01 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: how does her butt taste?
Message-Id: <56v7u7.f56.ln@magna.metronet.com>
Grrr (grrr@grrr.net) wrote:
: George Jempty wrote:
: > If I'm in their killfile I probably didn't want to hear any of their BS
: > anyway but thanks anyway
: and, earlier,
: > Sure, I've violated all sorts of protocol with this thread, but I sometimes
: do that just to get a reaction.
: Don't expect any knowledgable person to help you in the least.
George is a troll.
Knowledgable people killfile them as soon as they identify
their troll-ness.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 16 Oct 1999 04:35:14 GMT
From: nimchu@hal-pc.org (Nim Chu)
Subject: Re: How to inquire, position and click the mouse in PERL?
Message-Id: <7u8kp1$5hh$1@news.hal-pc.org>
Tom Phoenix <rootbeer@redcat.com> wrote:
>On Fri, 15 Oct 1999, Nim Chu wrote:
>> I am using Windows 98. I think there may exists a PERL module to
>> inquire the current position of the mouse (which can be anywhere on
>> the screen), set it to a new position, and right click the mouse, all
>> under PERL script control. Can anyone give me some directions where to
>> look. Thanks.
>See the FAQ, section 8. Cheers!
Perlfaq8 talks about text-based cursor which is not what I need. But
it also mentions TK which is a graphics package for Perl. But TL only
(may be I am wrong) manipulates the cursor only when the cursor is in
TK's graphical windows, not when it is outside TK's window. My
objective is move a cursor which is lying outside TK's graphics window
into TK's window, do something, and then return it back to its
original position (and thus focus is returned back to the original
application) which is outside TK's window.
Someone told that there is a Windows system DLL for manipulating the
cursor and I think Perl can issue DDL or API calls.
------------------------------
Date: Sat, 16 Oct 1999 11:21:18 +0900
From: "ÃÖÇö½Ä" <choigo7@hitel.net>
Subject: How to socket
Message-Id: <7u8nc9$hm8$1@kpt1000.hitel.net>
Hi
I have some question.
l'd like to check whether daomon port is alive.
So, l read from Socket , but I don't wirte to Socket.
How do I write socket descripter?
I have sample code for socket.
Please, I need your help.
#!/usr/bin/perl -w
use strict;
use Socket;
my ($remote,$port, $iaddr, $paddr, $proto, $line);
$remote = shift || 'localhost';
$port = shift || 25; # random port
if ($port =~ /\D/) { $port = getservbyname($port, 'tcp') }
die "No port" unless $port;
$iaddr = inet_aton($remote) || die "no host: $remote";
$paddr = sockaddr_in($port, $iaddr);
$proto = getprotobyname('tcp');
socket(SOCK, PF_INET, SOCK_STREAM, $proto) || die "socket: $!";
connect(SOCK, $paddr) || die "connect: $!";
while (defined($line = <SOCK>)) {
print $line;
}
#############################################################
# print SOCK ("quit\n"); <------ It's wrong
Please, Fill in correct code.
#############################################################
close (SOCK) || die "close: $!";
exit;
------------------------------
Date: Fri, 15 Oct 1999 15:57:34 -0700
From: John Ivens <jivens@lpl.arizona.edu>
Subject: Newbie Question: XS
Message-Id: <3807B15E.A4C2DC93@lpl.arizona.edu>
Anyone who can help will, of course, have my undying gratitude.
Unfortunately, I cannot pay you.
I have been able to successfully add functions that modify their input
parameters when they are long and
double values. Input values are currently working with string values,
double and long. However, I am
having trouble dealing with strings that get modified and returned, and
figuring out how to pass arrays.
Does anyone know how to generate the correct typemaps for
char []
double[3]
double[3][3]
I am passing these through to functions which are in libraries that
modify their input values. These functions were not written by me, and
cannot be changed.
Example of code that WORKS:
In perl script
# Determine the ephemeris time from universal coordinated time
&SPICE::pl_utc2et($utc, $et);
print("get_et: The time is $utc, ephemeris seconds til J2000 = $et\n");
In SPICE.xs
void
pl_utc2et(utc, et)
const char * utc
double &et
CODE:
utc2et(utc, &et);
OUTPUT:
et
Example of code that doesn't work:
In Perl Script:
&SPICE::pl_surfpt(@vpos, @vpnt, $r1, $r2, $r3, @vsurf, $found)
In SPICE.xs:
void
pl_surfpt(vpos, vpnt, r1, r2, r3, vsurf, found)
double vpos[3]
double vpnt[3]
double &r1
double &r2
double &r3
double vsurf[3]
long &found
CODE:
/* Array vpos[3] */
/* Array vpnt[3] */
/* Array vsurf[3] */
surfpt(vpos, vpnt, r1, r2, r3, vsurf, &found);
OUTPUT:
vsurf
found
HELP!!!
------------------------------
Date: Fri, 15 Oct 1999 15:59:45 -0700
From: John Ivens <jivens@lpl.arizona.edu>
Subject: Newbie XS Question
Message-Id: <3807B1E1.F9B10416@lpl.arizona.edu>
Ok, part two to my question. When I try to use char ** in the SPICE.xs
code I get this error when I try
to run make:
ld.so.1: perl: fatal: relocation error: file
blib/arch/auto/SPICE/SPICE.so: symbol XS_unpack_charPtrPtr: referenced
symbol not found
Killed
HELP**
------------------------------
Date: 16 Oct 1999 01:36:37 GMT
From: lt lindley <ltl@rgsun40.viasystems.com>
Subject: offtopic web transactions was [Re: What is best..?]
Message-Id: <7u8kr5$1il$1@rguxd.viasystems.com>
Abigail <abigail@delanet.com> wrote:
:>The best advice is not to use a stateless protocol for something
:>that requires state. Every "solution" to this problem has its
:>drawback, and will not work in all cases.
This is not my bailiwick. I know about the stateless nature
of HTTP and understand the various failure scenarios, but
I've never needed to play in this arena.
What do the big sites do? Maintain transaction state in their
database for a fixed period of time and do garbage collection?
Just curious. I don't expect a comprehensive answer.
Pointers to papers on this subject would be interesting.
--
// 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: Fri, 15 Oct 1999 18:59:52 -0500
From: "Randy Kobes" <randy@theory.uwinnipeg.ca>
Subject: Re: pod2html: simple how-to question
Message-Id: <7u8f30$are$1@canopus.cc.umanitoba.ca>
Jim Garrison <jhg@acm.org> wrote
in message news:38079038.94DDE522@acm.org...
> I have a Perl installation with a bunch of stuff added
> from CPAN (using the CPAN module), and I would like to
> (re-)generate a complete set of HTML documentation.
>
> Can someone please post the command sequence one would
> issue, from which directory, to accomplish this. The
> usage instructions that come with pod2html are insufficient
> for this task. (Perl installed in /usr/lib/perl5)
>
Hi,
I think one could infer from the docs for pod2html how
to do this .... However, there's another module,
PodToHTML, in the CPAN directory authors/id/NI-S,
that has a script podtohtml, the docs for which show
how this exact thing can be done.
best regards,
Randy Kobes
------------------------------
Date: Sat, 16 Oct 1999 03:00:10 GMT
From: ghost24@bctek.com (Ghost)
Subject: Re: Proper way to test if a hash key's value is defined.
Message-Id: <s0fqhqehr0168@corp.supernews.com>
In article <rh16u7.id4.ln@magna.metronet.com>,
tadmc@metronet.com (Tad McClellan) writes:
>
> Yes it is.
>
> If you still think that, then keep thinking, 'cause you don't
> "have it" yet.
Damn it! It finnaly seemed to make sense, and know you tell me
I still got it wrong!! I guess thats why Im still learning!! I guess
its a good thing I like a chalange.
Thanks everyone for their insights!
ghost24
------------------------------
Date: Sat, 16 Oct 1999 02:02:34 GMT
From: Brandon <pooka@cygnus.ucdavis.edu>
Subject: Re: tr// question
Message-Id: <38076BF7.8E60DFDD@cygnus.ucdavis.edu>
Ala Qumsieh wrote:
>
> Brandon <pooka@cygnus.ucdavis.edu> writes:
>
> > Abigail wrote:
> > >
> > > Brandon (pooka@cygnus.ucdavis.edu) wrote on MMCCXXXVI September MCMXCIII
> > > in <URL:news:38064EA9.9A4F75E3@cygnus.ucdavis.edu>:
> > can't get my chemisty experiment to work properly." "Go read the
> > textbook again. I'm too busy coming up with clever signature lines."
>
> But teachers teach you *HOW* to solve your problems. They don't merely
> give solutions. Abigail was being a good teacher there, IMHO.
>
> If that's your logic, then I can see you getting a calculator to add 1
> and 1.
That's a pretty clever analogy. Your own creation?
Abigail didn't tell him _how_ to solve his problem. She merely reminded
him of his problem, and not in a respectful way.
------------------------------
Date: Sat, 16 Oct 1999 02:07:49 GMT
From: Brandon <pooka@cygnus.ucdavis.edu>
Subject: Re: tr// question
Message-Id: <38076D36.469AA5B0@cygnus.ucdavis.edu>
Greg Bacon wrote:
>
> In article <38065BA5.F4DBEC69@cygnus.ucdavis.edu>,
> Brandon <pooka@cygnus.ucdavis.edu> writes:
>
> : You're pretty accusatory for someone who just gave a lecture on "how do
> : you know this" and "how do you know that". My only grudge is against
> : derisive answers to perfectly reasonable questions.
>
> This newsgroup is not a helpdesk. People who already know Perl won't be
> interested elementary answers to elementary Perl problems. If we
> followed your approach, we would ruin comp.lang.perl.misc.
>
> Greg
> --
> If you're right 90% of the time, why quibble about the remaining 3%?
Apparently, you're all interested enough to make the effort to offer
snide answers. Why not just say nothing, instead of putting people down?
But then again, how would that make you feel bigger... Better not risk
it..
------------------------------
Date: Sat, 16 Oct 1999 02:12:58 GMT
From: Brandon <pooka@cygnus.ucdavis.edu>
Subject: Re: tr// question
Message-Id: <38076E6C.2E739CBE@cygnus.ucdavis.edu>
Tad McClellan wrote:
>
> And abigail is wondering which part that is.
Sure she is.
------------------------------
Date: 15 Oct 1999 23:02:24 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: tr// question
Message-Id: <x7hfjsgg8v.fsf@home.sysarch.com>
>>>>> "B" == Brandon <pooka@cygnus.ucdavis.edu> writes:
B> Apparently, you're all interested enough to make the effort to offer
B> snide answers. Why not just say nothing, instead of putting people down?
B> But then again, how would that make you feel bigger... Better not risk
B> it..
here is a helpful comment. go away. you don't know perl. you haven't
done a single damn thing but complain about other posts. you haven't
answered a single question with a correct response. you can't handle
when others correct your code. you don't code for a wide range of
conditions or code for specified conditions.
there, no rtfm, no snide tone, just an honest assessment of your value in
this group.
now go back to studying for your classes. you have a test tomorrow. it
is in the class of learning what you don't know. you are in danger of
flunking it.
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: 15 Oct 1999 19:36:38 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: What is best..?
Message-Id: <slrn80fi44.q8s.abigail@alexandra.delanet.com>
Mat Tillett (u2orange@bigfoot.com) wrote on MMCCXXXVI September MCMXCIII
in <URL:news:380768BA.487C1C4F@bigfoot.com>:
[] Hi,
[]
[] I am in thought of writing a cgi script that allow users to multiselect
[] items from an online database. Now to store their selected choices I
[] could either write a file out to the server by using their IP number and
[] storing the data within that file or I could do it as a cookie. What is
[] best..? Please bear in mind that if I write a file to the server, I
[] have then got to figure out when they have left the site (abnormaly) how
[] to check and remove the file immediately.
[]
[] Any advice is good advice..!
The best advice is not to use a stateless protocol for something
that requires state. Every "solution" to this problem has its
drawback, and will not work in all cases.
There is no such thing as "leaving" a site. HTTP works essentially
like this:
- The browser notices the user wants to see a page.
- Browser connects to the server.
- Connection made.
- Browser requests the appropriate page.
- End of request.
- Server sends page.
- End of response.
- END OF CONNECTION.
Now, keep-alive is a HTTP/1.1 option that muddies the water a bit,
but no browser is required to use this.
Abigail
--
perl -e '$a = q 94a75737420616e6f74686572205065726c204861636b65720a9 and
${qq$\x5F$} = q 97265646f9 and s g..g;
qq e\x63\x68\x72\x20\x30\x78$&eggee;
{eval if $a =~ s e..eqq qprint chr 0x$& and \x71\x20\x71\x71qeexcess}'
-----------== 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: 16 Oct 1999 02:17:01 +0200
From: Atif Ghaffar <atif@developer.ch>
Subject: Re: What is best..?
Message-Id: <m2yad4gnwi.fsf@mozilla.developer.ch>
Please do not use Ip address.
Do not assume IP address to be unique.
All sensible companies use firewalls to separate their internal
network from external network.
In my company for example almost 1500 people surfing the web from
different parts of the country are using the same ip address.
(The external ip address)
You are better off with a server-side cookie and client-side
cookie token system.
Mat Tillett <u2orange@bigfoot.com> writes:
> Hi,
>
> I am in thought of writing a cgi script that allow users to multiselect
> items from an online database. Now to store their selected choices I
> could either write a file out to the server by using their IP number and
> storing the data within that file or I could do it as a cookie. What is
> best..? Please bear in mind that if I write a file to the server, I
> have then got to figure out when they have left the site (abnormaly) how
> to check and remove the file immediately.
>
> Any advice is good advice..!
>
>
> Regards,
>
> Mat
>
> u2orange@bigfoot.com
------------------------------
Date: Sat, 16 Oct 1999 02:34:06 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Writing an IMAP Client
Message-Id: <yuRN3.7478$E_1.413524@typ11.nn.bcandid.com>
In article <7u7mba$qdt$1@nnrp1.deja.com>,
howitgolook <howitgolook@my-deja.com> wrote:
>I wish to write an IMAP (Webmail) client a-la-Hotmail, using Perl.
>I will be communicating with a Cyrus IMAP server.
>Is there anywhere I can get perl code to get me started?
AtDot is written in Perl and is a web-based email system using POP.
It's under the GPL, so you can't include it in proprietary software,
but you can probably learn quite a bit from it.
It seems to be written mostly in Perl4; it doesn't use strict, -w, it
uses & and || a lot, and it uses require 'filename' instead of use
module most of the time. OTOH, it uses CGI.pm and Socket.pm, is in use
by lots of people on a daily basis, is actively maintained, and appears
to be written by somebody who (a) knows how to program and (b) knows
how to write readable code, even if he's not a Perl expert.
You can download it from http://www.nodomainname.net/software/atdot/
among other places.
>What modules will I need?
Well, you almost never *need* modules in Perl. But one or more of the
CGI modules, the Mail::IMAPClient module, Mail::Cclient, Mail::Folder,
and maybe other Mail:: modules might save you lots of work.
>Any advice for this sort of project?
Have fun. It'd be nice if I could try your results too :)
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
Tue Oct 12 1999
28 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
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 1090
**************************************