[22646] in Perl-Users-Digest
Perl-Users Digest, Issue: 4867 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Apr 20 22:56:23 2003
Date: Sun, 20 Apr 2003 11:05:08 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sun, 20 Apr 2003 Volume: 10 Number: 4867
Today's topics:
Re: ANN: International Perl Beginners Mailing List <bernie@fantasyfarm.com>
Re: French ascii characters? <nmihai_2000@yahoo.com>
Re: grep in array <mr@sandman.net>
Re: LWP Problem with 500 (Internal Server Error) Can't (Chacrint Charinthorn)
Re: newbie lib dir question <eddy@NOSPAMaxa.it>
Re: Odd HTML mails <terjek@operamail.com>
Perl & Office <s.lepolozec@wanadoo.fr>
PerlScript, handbook <s.lepolozec@wanadoo.fr>
Please help with HTML::Mason configuration/installation (Boris Pelakh)
Re: programmer survey <terjek@operamail.com>
Re: Recusively search directory... <kasp@epatra.com>
Re: Smart searching (Sam Holden)
Trouble with LWP <kasp@epatra.com>
Re: Unlink Not Working On Windows Server <bart.lateur@pandora.be>
Re: Unlink Not Working On Windows Server <bart.lateur@pandora.be>
Re: Unlink Not Working On Windows Server (Tad McClellan)
Using Rijndael encryption on socket connection between <rene_404@thekrofties.net>
Why COOKIE deleted? <sbz@sbzsystems.com>
Re: Why COOKIE deleted? <mbudash@sonic.net>
Re: Won't let me use $[ !!! <jaspax@u.washington.edu>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 20 Apr 2003 08:55:25 -0400
From: Bernie Cosell <bernie@fantasyfarm.com>
Subject: Re: ANN: International Perl Beginners Mailing List
Message-Id: <9F0386CA135DF9CA.42EC3E021CC30883.568CDB180A8E67F8@lp.airnews.net>
Shlomi Fish <shlomif@vipe.technion.ac.il> wrote:
} On 18 Apr 2003, Randal L. Schwartz wrote:
}
} > and the list is remarkably high in signal to noise ratio.
}
} This may be true. However, it is also of very high volume. My purpose is
} to create another mailing list which users and experts can choose to be
} part of as well. Eventually, each list will develop a slightly different
} culture and atmosphere. I wish to see other lists as well.
What's odd about this is that you assume, I guess, that there is a
bottomless well of 'experts' and so just starting a new list will get some
new font of expertise to appear to provide the info for your subscribers
[else, where with the 'signal' for your new list come from?] How do you
suppose that would work?
1) Do you expect some experts to leave the current list and join yours
[which just waters down the expertise pool, leaving two less-well-supported
lists in the place of one very-well-supported one]
or
2) do you expect experts to provide their pro-bono help to BOTH lists...
[how charitable of you to volunteer them!]
Or do you have some other plan for where the 'signal' will come from for
your list?
And what about users? Instead of concentrating the expertise, so a
newcomer can go to *ONE* place and be highly likely to get on-the-mark
help, the users will have to [probably] subscribe to BOTH, no? [which'll
make their 'volume' problems potentially worse... at the least it'll make
it no better]
} > There is no need for *another* list. Shlomi has not demonstrated the
} > need, except from a selfish "not invented here" position.
}
} The need is the high volume of the existing list.
But this is silly, IMO -- how does making TWO arguably-identical lists fix
the volume problem? It would be one thing if you wanted to _split_ the
list [much as there is a '.modules' newsgroup for inquiries specific to
module-related matters], but you're not suggesting that: you're *JUST*
proposing to duplicate the existing resource. In a similar vein,
comp.lang.perl.misc has a fairly high volume, do you really think that if
there were a "comp.lang.perl.misc2" newsgroup, otherwise identical in
charter and intent from the first, that that would do accomplish anything
useful?
} > Shlomi - you are hurting the community. Please stop.
}
} How am I hurting the community? By distributing effort?
You're *NOT* distributing the effort, you're *DILUTING* the effort and I
don't see how that's good. Everyone is free to do as they wish, of course,
but if you have the energy and desire to help the community, at the least
you could try spend that effort doing something that would have a good
chance of being really useful, no?
/Bernie\
--
Bernie Cosell Fantasy Farm Fibers
bernie@fantasyfarm.com Pearisburg, VA
--> Too many people, too few sheep <--
------------------------------
Date: Sun, 20 Apr 2003 07:45:29 GMT
From: "Mihai N." <nmihai_2000@yahoo.com>
Subject: Re: French ascii characters?
Message-Id: <Xns93637C2A803CMihaiN@216.148.227.77>
> When the output is sent to a text file (instead of the command line),
> all of the accented characters are displayed correctly.
Well, then this is your answer.
Windows uses cp1252 for GUI applications and cp850 command line.
Actualy 850 is for French, but if you do your tests on a US system
it will be 437 in the console. I agree, this is a mess.
But I just hope (for you) the desired output is 1252. At lease
you will have the same code page for US and French systems.
Since the text looks ok in notepad, I just assume you receive 1252
and output 1252. This is ok, if you don't need any case conversions
or other processing.
As for conversion (in case you need it), if you are using Perl 5.8
you need nothing else. You can open a file or use binmode to specify
the encoding.
Mihai
------------------------------
Date: Sun, 20 Apr 2003 12:19:35 +0200
From: Sandman <mr@sandman.net>
Subject: Re: grep in array
Message-Id: <mr-4C39A2.12193520042003@news.fu-berlin.de>
In article <4nof361n53.fsf@lockgroove.bwh.harvard.edu>,
Ted Zlatanov <tzz@lifelogs.com> wrote:
> > But the problem is that I can't seem to access $& in that
> > scope. What I would want to do above is:
> >
> > foreach $name (@names){
> > if (grep {$name =~m/$_/i } keys %people){
> > $fullname = $people{$`$&$´};
> > print "$fullname is a friend of ours!\n"
> > }
> > }
> >
> > But for some reason, $`$&$´ doesn't contain anything there... Any
> > ideas?
>
> Yes, you're doing it wrong.
>
> 1) $& and such special variables are usually unnecessary, especially
> for tasks as simple as yours. Your code is badly written, that's
> why you're having trouble.
So tell me how I set a variable to the full string I found a match in, please.
--
Sandman[.net]
------------------------------
Date: 20 Apr 2003 10:08:22 -0700
From: chacrint@hotmail.com (Chacrint Charinthorn)
Subject: Re: LWP Problem with 500 (Internal Server Error) Can't read entity body
Message-Id: <bfe227db.0304200908.48c56fc7@posting.google.com>
helgi@decode.is (Helgi Briem) wrote in message news:<3e9a7e50.325820274@news.cis.dfn.de>...
> On 12 Apr 2003 06:31:23 -0700, chacrint@hotmail.com
> (Chacrint Charinthorn) wrote:
>
> >I tried to post using LWP but I got the following error:
> >500 (Internal Server Error) Can't read entity body: Connection
> > reset by peer
>
> Perl doesn't have a 500 error. Web servers do.
> Is this a stealth CGI question? If so, you would
> be well advised to consult the FAQ documents,
> specifically perldoc -q 500, also known as:
>
> "My CGI script runs from the command line but not the
> browser. (500 Server Error)"
>
> Short answers:
> 1- Debug your program on the command line first before
> adding the added complexity of the Common Gateway
> Interface.
>
> 2- Use the CGI.pm module that comes as standard
> with every Perl distribution.
below is the output of LWP logfile. Moreover, the script is run on the command line
# LWP::DebugFile logging to ./tmp/lwp_3ea2ca44_59a9.log
# Time now: {1050856004} = Sun Apr 20 23:26:44 2003
LWP::UserAgent::new: ()
LWP::UserAgent::request: ()
LWP::UserAgent::send_request: POST http://www.target.com/Service.php
LWP::UserAgent::_need_proxy: Not proxied
LWP::Protocol::http::request: ()
# Time now: {1050856184} = Sun Apr 20 23:29:44 2003
LWP::UserAgent::request: Simple response: Internal Server Error
------------------------------
Date: Sun, 20 Apr 2003 11:54:16 +0200
From: "Eddy" <eddy@NOSPAMaxa.it>
Subject: Re: newbie lib dir question
Message-Id: <b7tqnm$egi$1@lacerta.tiscalinet.it>
Ok, but what if I have two main perl5 library directory?
/usr/local/lib/perl5/
and
/usr/lib/perl5/
Eddy
"Joe Smith" <inwap@inwap.com> ha scritto nel messaggio
news:Uiroa.8261$io.297092@iad-read.news.verio.net...
> In article <b7ob5s$745$1@lacerta.tiscalinet.it>,
> Eddy <eddy@NOSPAMaxa.it> wrote:
> >Well,
> >
> >If I delete the old libs look what happens with apache:
> >
> >[root@www /]# mv /usr/lib/perl5 /usr/lib/00perl5
>
> Ack! No.
>
> mv /usr/lib/perl5/5.00503 /usr/lib/perl5/unused-5.00503
>
> You can remove or delete old version-specific subdirectories, but
> not the main perl5 library directory.
> -Joe
>
> --
> See http://www.inwap.com/ for PDP-10 and "ReBoot" pages.
------------------------------
Date: Sun, 20 Apr 2003 19:37:37 +0200
From: Terje K <terjek@operamail.com>
Subject: Re: Odd HTML mails
Message-Id: <01zoa.5373$8g5.80668@news2.e.nsc.no>
Seems to me as a "long lines" problem. if the length of the lines exceed
some fixed length that i cant remember now, depending on your encoding, it
will behave like you explained.
how about a base64 encoding of the attachment ?
Terje
Caie wrote:
> Hello Wizards and Muggles,
>
> A quick question for you that is confusing me. I'm developing a
> program which takes a text document, does some fancy stylistic
> calculations on it and generates a vareity of HTML pages with the
> results.
>
> The generated HTML is fine - all tables, jpegs, links and so on are
> generated nicely. The problem comes when I try to send these results
> as an E-mail using the MIME::Lite module from CPAN. This is the code
> I'm using to generate the E-mail:
>
> <SNIP>
> # Call the external module MIME::Lite
> use MIME::Lite;
> # Construct E-mail object
> my $msg = MIME::Lite->new(
> To =>$to,
> From =>$from,
> Subject =>$subject,
> Type =>'multipart/mixed'
> );
> # Read in the HTM file
> while(<BODYTEXT>) {
> $body .= $_;
> }
> close BODYTEXT;
> $msg->attach(
> Type => 'text/html',
> Data => $body
> );
>
> # Print out the MIME to an E-mail log file
> open(MIMEOUT, ">/lastemail.log") or die "Unable to open LOG for
> writing of MIME";
> $msg->print(\*MIMEOUT);
> close MIMEOUT;
>
> # Send it
> $msg->send();
> </SNIP>
>
> Basically I've created a HTM file with a copy of the HTML generated
> during the program, this is then read in to a variable ($body) and
> attached to the message. When viewing the HTM file with the browser
> there is nothing wrong - it is indeed an exact copy of what the
> program has generated, however, when viewing the E-mail sent with
> Outlook or in Hotmail it has gone a bit screwy.
>
> Every couple of lines there appear exclamation marks in the middle of
> words, and a table has decided to boycott a column header. I suspect
> this has something to do with the way I've attached the HTML to the
> $msg object. Do I have to add images and HTML seperatly, that is - do
> I have to have an assortment of $msg->attach(...) for different types
> of data? Or am I just using the wrong header (I've tried
> multipart/mixed as well as multipart/related - can't think of any
> others off the top of my head that would sort it).
>
> Any ideas?
>
> Caie
------------------------------
Date: Sun, 20 Apr 2003 13:45:12 +0200
From: "Stéphane Lepolozec" <s.lepolozec@wanadoo.fr>
Subject: Perl & Office
Message-Id: <b7u18b$o8l$1@news-reader13.wanadoo.fr>
Hello,
I seek to create a small utility of documentation allowing to
know the title, the author and the key words associated documents
Word, Excel... (Office of Microsoft). These values are accessible
from file > properties > summary in the various Office
documents.
Can one reach these values starting from Perl: I tested
starting from WIN32::OLE without success.
Thank you for any help:)
------------------------------
Date: Sun, 20 Apr 2003 14:23:37 +0200
From: "Stéphane Lepolozec" <s.lepolozec@wanadoo.fr>
Subject: PerlScript, handbook
Message-Id: <b7u3gc$d8q$1@news-reader13.wanadoo.fr>
Hello,
I found many references to the use of PerlScript in a Web page,
and even of the examples, but any handbook of the language which seems
differed from Perl. Where can one find one of them?
Thank you.
------------------------------
Date: 20 Apr 2003 09:42:22 -0700
From: pelakh@yahoo.com (Boris Pelakh)
Subject: Please help with HTML::Mason configuration/installation !
Message-Id: <44ec9ada.0304200842.49578078@posting.google.com>
I am trying to re-install a complete site on a new server. The site was
written using HTML::Mason by a third party, which is no longer reachable.
The server is running RedHat 8/Apache 2.0.40 with mod_perl support.
After installing most of the module requested by the Makefile.PL from
the Mason bundle, I still get 'need Apache::Request'. That is part of
libapreq, which requires some parts from mod_perl (Apache/src.pm, etc).
And that requires the Apache source. Now, I pulled and built the source
for 2.0.45 (most recent release), but I am very confused as to what my
next steps should be.
Somehow, I should be able to build mod_perl, pointing it to my new 2.0.45
Apache sources, then build libapreq, and then complete Mason. However,
the mod_perl install only wants Apache 1.x.
Please help, for I am lost - this is my first major Linux configuration
project, having always hosted on 3rd party systems before.
-- Boris
------------------------------
Date: Sun, 20 Apr 2003 13:07:31 +0200
From: Terje K <terjek@operamail.com>
Subject: Re: programmer survey
Message-Id: <hjtoa.5403$b71.84484@news4.e.nsc.no>
Abigail wrote:
typical Abigail attitude. why dont we fuck up this survey just for fun.
Terje
> Steve Shaffer (scs12@psu.edu) wrote on MMMDXVIII September MCMXCIII in
> <URL:news:50loa.10784$ot1.9377@nwrdny02.gnilink.net>:
> @@ Hi. I'm doing academic work for Penn State and have a brief survey
> for
> @@ professional programmers. If you have 3 minutes to answer some simple
> @@ questions, I'd appreciate it. The URL is:
> @@
> @@ http://www.ezwebsurveys.com/programmers.html
> @@
>
>
> And for those who don't know what to answer, a Perl program to help
> them out:
>
> #!/usr/bin/perl
>
> use strict;
> use warnings;
>
> use WWW::Mechanize;
>
> my $url = "http://www.ezwebsurveys.com/programmers.html";
>
> my $agent = WWW::Mechanize -> new ();
>
> my $res = $agent -> get ($url);
>
> unless ($res -> is_success) {
> die "Failed to fetch $url.\n", $res -> error_as_HTML, "\n";
> }
>
> $agent -> form (1) or die "Could not find a form.\n";
>
> foreach my $input ($agent -> current_form -> inputs) {
> next if $input -> type eq 'submit';
> my @values = $input -> possible_values;
> $agent -> field ($input -> name, $values [rand @values]);
> }
>
> $res = $agent -> click;
>
> unless ($res -> is_success) {
> die "Failed to fetch form.\n", $res -> error_as_HTML, "\n";
> }
>
> __END__
>
>
> Abigail
------------------------------
Date: Sun, 20 Apr 2003 20:47:51 +0530
From: "Kasp" <kasp@epatra.com>
Subject: Re: Recusively search directory...
Message-Id: <b7udn7$2bf$1@newsreader.mailgate.org>
Is there a way to specify a filter for the file to be searched?
For eg *.txt, *.html ?
--
"Accept that some days you are the pigeon and some days the statue."
"A pat on the back is only a few inches from a kick in the butt." - Dilbert.
------------------------------
Date: 20 Apr 2003 07:47:19 GMT
From: sholden@flexal.cs.usyd.edu.au (Sam Holden)
Subject: Re: Smart searching
Message-Id: <slrnba4k47.du0.sholden@flexal.cs.usyd.edu.au>
On Sun, 20 Apr 2003 11:42:04 +0530, Kasp <kasp@epatra.com> wrote:
> I had worked on a project involving AltaVista search libraries. But they
> have some licensing issue and I can't use them in my freelancing project. It
> was pretty simple as I just specified the document and it handles, the
> scoring, indexing and searching part.
>
> I tried to look for some such perl module, but I couldn't find any. So I
> just wondered if someone out here had used/done something like this before.
There's Text::Query::Advanced and Text::Query::Simple.
I used them years ago, but they don't seem to have been updated since then.
Which may mean they are super stable and perfect...
Or of course it may mean they are old and ancient and unmaintained
and broken...
--
Sam Holden
------------------------------
Date: Sun, 20 Apr 2003 22:47:20 +0530
From: "Kasp" <kasp@epatra.com>
Subject: Trouble with LWP
Message-Id: <b7ukn8$bhi$1@newsreader.mailgate.org>
I was tinkering with LWP module and I tried a piece of code given at
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=8cd8d7pl
9a.fsf%40gadget.cscaper.com&rnum=9&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF
-8%26oe%3DUTF-8%26q%3Dperl%2B%2BLWP%2Bget%2Bimage
Here is the code:
use LWP::Simple;
getstore('http://www.perl.com/graphics/ora_logo.gif','ora_logo.gif');
When I run this code, it gives me error:
Use of uninitialized value in pattern match (m//) at
E:/Perl58/site/lib/LWP/Protocol.pm line 114.
Use of uninitialized value in concatenation (.) or string at
E:/Perl58/site/lib/LWP/Protocol.pm line 87.
Why is this coming? I have recently plunged into the Perl modules...I just
hope that the recently loaded Activestate 5.8 on my machine is not the
cause.
If you feel the code is correct, then could someone please also tell me with
version does LWP work without much trouble :-)
Thanks.
--
"Accept that some days you are the pigeon and some days the statue."
"A pat on the back is only a few inches from a kick in the butt." - Dilbert.
------------------------------
Date: Sun, 20 Apr 2003 08:31:32 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: Unlink Not Working On Windows Server
Message-Id: <qmm4av8a63smt8h5aoofot53ha4pilri1d@4ax.com>
George wrote:
>unlink($delPath$filename);
This problem has nothing to do with running on Windows.
--
Bart.
------------------------------
Date: Sun, 20 Apr 2003 08:32:41 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: Unlink Not Working On Windows Server
Message-Id: <5om4av85gdotan2i4r703skijrabqru29s@4ax.com>
Tad McClellan wrote:
>> unlink($delPath$filename);
>
>
>If you want to know why the unlink() failed, then you should
>ask why the unlink failed by testing its return value and
>outputting the $! variable's contents:
>
>
> unlink($delPath$filename) or die "could not unlink: $!";
Come on Tad, you can't be *that* stupid?
It just doesn't compile, that's the problem.
--
Bart.
------------------------------
Date: Sun, 20 Apr 2003 11:35:00 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Unlink Not Working On Windows Server
Message-Id: <slrnba5j1k.kna.tadmc@magna.augustmail.com>
George <geo@divergentweb.NO.SPAM.com> wrote:
[snip full-quote]
> As I mentioned in my original post I have tried "....die..." including the
> $! and it did not work.
Beware of saying "doesn't work"
This is a "red flag" phrase. If you find yourself writing that,
pause and see if you can't describe what is not working without
saying "doesn't work". That is, describe how it is not what you
want.
> I do not have access to the command line so far as I
> know (Telnet?).
perldoc -q CGI
"How can I get better error messages from a CGI program?"
Asking a Frequently Asked Question
It should be understood that you may have missed the applicable FAQ
when you checked, which is not a big deal. But if the Frequently
Asked Question is worded similar to your question, folks will assume
that you did not look at all. Don't become indignant at pointers to
the FAQ, particularly if it solves your problem.
> I tried the lines below one at a time and only got an HTTP
> 500 "Internal Server Error" :
perldoc -q CGI (again)
"My CGI script runs from the command line but not the
browser. (500 Server Error)"
> The path to the sample file I am trrying to unlink is
> "/home/httpd/vhosts/thewebsite.com/httpdocs/datafiles/houseimages/".
> Permissions are noted
> below:
> /houseimages - 755
That looks like a Unix path and Unix permissions, but that can't
be, given the Subject you've chosen.
Can paths really look like that on a Windows server?
Have you seen the Posting Guidelines that are posted here frequently?
http://mail.augustmail.com/~tadmc/clpmisc.shtml
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 20 Apr 2003 18:09:37 +0200
From: "rene_404" <rene_404@thekrofties.net>
Subject: Using Rijndael encryption on socket connection between Windows and Unix...
Message-Id: <3ea2c63a$0$49112$e4fe514c@news.xs4all.nl>
Hi,
I'm using Rijndeal encryption to secure the data that I want to send over a
socket connection. When I send some text over the socket from a Windows
client to a OpenBSD server the decryption will not work :( From a OpenBSD
to an OpenBSD machine or from a Windows to a Windows machine is does work!
Does somebody know a solution?
Thanks!
René
The Netherlands
- The server script is running on OpenBSD 3.2 with perl v5.6.1.
- The client script is running on Windows with ActivePerl v5.6.1.
----- Output client.pl -------
Plaintext: Testing123
Encrypted: E8?f?c¶?úÉb?°.??
----- Output client.pl -------
----- Output server.pl -------
Encrypted: E8ðfõc£b±ø.Ñ
Decrypted: Uåì@6ingj³ð
----- Output server.pl -------
Used Script:
-------------------client.pl On Windows with
ActivePerl------------------------
use IO::Socket;
use Crypt::Rijndael;
$cipher = new Crypt::Rijndael "keyhere", Crypt::Rijndael::MODE_CBC;
$cipher->set_iv($iv);
my $sock = new IO::Socket::INET (
PeerAddr => '172.25.1.25',
PeerPort => '65121',
Proto => 'tcp',
);
die "Could not create socket: $!\n" unless $sock;
$plaintext = "Testing123";
$plaintext16= get16($plaintext);
$crypted = $cipher->encrypt($plaintext16);
print "Plaintext: $plaintext\n";
print $sock "$crypted";
print "Encrypted: $crypted\n";
close($sock);
#this sub makes all data blocksize of 16 bytes.
sub get16 {
my $data = shift;
return "\0" x ( 16 - length($data)%16 ) . $data;
}
---------------------------------end of
client.pl----------------------------------
---------------------------server.pl on
OpenBSD--------------------------------
use IO::Socket;
use Crypt::Rijndael;
$cipher = new Crypt::Rijndael "keyhere", Crypt::Rijndael::MODE_CBC;
$cipher->set_iv($iv);
my $sock = new IO::Socket::INET (
LocalHost => '172.25.1.25',
LocalPort => '65121',
Proto => 'tcp',
Listen => 1,
Reuse => 1,
);
die "Could not create socket: $!\n" unless $sock;
my $new_sock = $sock->accept();
while (defined ($buf = <$new_sock>))
{
print "Encrypted: $buf \n";
$decrypted = $cipher->decrypt($buf);
print "Decrypted: $decrypted";
}
----------------------------end of
server.pl--------------------------------------
------------------------------
Date: Sun, 20 Apr 2003 19:44:53 +0300
From: "SBZ systems" <sbz@sbzsystems.com>
Subject: Why COOKIE deleted?
Message-Id: <b7uiq4$8ue$1@newsmaster.public.dc.hol.net>
Hello
I have a little problem
I create a cookie that I want to be live for 24 hours but when I close
internet explorer the cookie deleted
This is the script:
$expiration='+24H';
$domain="freeextra.com";
$path='';
$name="test";
$value="ok";
$secure=0;
print "Set-Cookie: ";
print ($name, "=", $value, "; expires=", $expiration,"; path=", $path, ";
domain=", $domain, "; ", $secure, "\n");
thanks in advance
Solon Zenetzis
------------------------------
Date: Sun, 20 Apr 2003 17:21:58 GMT
From: Michael Budash <mbudash@sonic.net>
Subject: Re: Why COOKIE deleted?
Message-Id: <mbudash-B3BA76.10215920042003@typhoon.sonic.net>
In article <b7uiq4$8ue$1@newsmaster.public.dc.hol.net>,
"SBZ systems" <sbz@sbzsystems.com> wrote:
> Hello
>
> I have a little problem
> I create a cookie that I want to be live for 24 hours but when I close
> internet explorer the cookie deleted
>
> This is the script:
>
> $expiration='+24H';
> $domain="freeextra.com";
> $path='';
> $name="test";
> $value="ok";
> $secure=0;
> print "Set-Cookie: ";
> print ($name, "=", $value, "; expires=", $expiration,"; path=", $path, ";
> domain=", $domain, "; ", $secure, "\n");
it's your expiration date... the cookie "spec" doesn't allow for
'+24H'... you may be thinking of the CGI or CGI::Cookie perl modules...
you really should be using one of them...
hth-
--
Michael Budash
------------------------------
Date: Sun, 20 Apr 2003 00:02:25 -0700
From: JS Bangs <jaspax@u.washington.edu>
Subject: Re: Won't let me use $[ !!!
Message-Id: <Pine.A41.4.53.0304192353560.95442@dante18.u.washington.edu>
Tad McClellan sikyal:
> JS Bangs <jaspax@u.washington.edu> wrote:
> > Hmph.
> >
> > I have a great reason to use $[ in my script, and to set it to an
> > arbitrarily (and constantly changing) high value.
>
> Changing when?
>
> Between runs of the program?
>
> Or changing during the running of the program?
>
> If the later, then I don't know how to help you.
It's the latter. I have the array indices being stored at one point in the
program, and I wanted a way to shrink the array without changing the index
value. So I tried to write:
shift array;
$[++;
Which perl didn't like.
> > Specifically, when I write the line "$[ = $i;", I
> > get a compiler error that says "That use of $[ is unsupported."
>
>
> Did you look up that message in perldiag.pod?
Yes, after you pointed this out to me, and this basically explained it.
Now, $[ can only be 0 or 1, and it is severely constrained in how you
define it.
> > I'm quite curious what the justification is for this--
>
> Where did you look to find out?
Here? perldiag.pod has the justification I was looking for, but I didn't
know that that doc would have anything relevant.
Anyway, it looks like I'll have to find a different way of optimizing this
program.
Jesse S. Bangs jaspax@u.washington.edu
http://students.washington.edu/jaspax/
http://students.washington.edu/jaspax/blog
Jesus asked them, "Who do you say that I am?"
And they answered, "You are the eschatological manifestation of the ground
of our being, the kerygma in which we find the ultimate meaning of our
interpersonal relationship."
And Jesus said, "What?"
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 4867
***************************************