[15983] in Perl-Users-Digest
Perl-Users Digest, Issue: 3395 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jun 16 18:10:39 2000
Date: Fri, 16 Jun 2000 15:10:25 -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: <961193425-v9-i3395@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Fri, 16 Jun 2000 Volume: 9 Number: 3395
Today's topics:
Re: How to Concatenate <lr@hpl.hp.com>
Re: How to Concatenate (Abigail)
Re: How to Concatenate (Sean McAfee)
Re: How to Concatenate (Clinton A. Pierce)
Re: I can't figure this one out... (Newbie question) (David Bell)
Re: I can't figure this one out... (Newbie question) <care227@attglobal.net>
Re: I can't figure this one out... (Newbie question) <lr@hpl.hp.com>
Re: I can't figure this one out... (Newbie question) <lr@hpl.hp.com>
Re: I can't figure this one out... (Newbie question) <care227@attglobal.net>
Re: I can't figure this one out... (Newbie question) (Marcel Grunauer)
Re: I can't figure this one out... (Newbie question) (Craig Berry)
Re: I can't figure this one out... (Newbie question) <care227@attglobal.net>
Re: Login and passwords <antonio_gonzalez@wap3.net>
Re: looking for a 'diff' like comparison routine? (Joe Petolino)
Re: LWP::SecureSocket and https robb4444@my-deja.com
Re: MacPerl- Back to square one. (Jon S.)
Newbie Question <digitali@systemmedics.com>
Re: Newbie Question <you.will.always.find.him.in.the.kitchen@parties>
OT: Re: A Computer Programmers Profile <lr@hpl.hp.com>
Re: OT: Re: A Computer Programmers Profile <care227@attglobal.net>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 16 Jun 2000 11:53:22 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: How to Concatenate
Message-Id: <MPG.13b4177b302e009398ab91@nntp.hpl.hp.com>
[Crossposted and followups changed to comp.lang.perl.misc.]
In article <39496b8e@news.victoria.tc.ca> on 15 Jun 2000 16:49:34 -0800,
Malcolm Dew-Jones <yf110@vtn1.victoria.tc.ca> says...
> Huy Trinh (htrinh@bigfoot.com) wrote:
>
> : What function do I use to concatenate two or more strings? Thanks!
>
> read perlop.pod
>
> $string1 = 'this is a string';
> $string2 = ' and another string';
>
> $concatenated_string = $string1 . $string2 ;
Every time this question is asked, someone posts 'all' the other ways to
do it. So let me try:
$concatenated_string = "$string1$string2";
$concatenated_string = join "" => $string1, $string2;
$concatenated_string = pack 'A* A*' => $string1, $string2;
($concatenated_string = $string1) .= $string2;
($concatenated_string = $string1) =~ s/\z/$string2/;
More??? I'm sure there are also plenty of really inefficient
(character-by-character) ways, better not to be posted.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 16 Jun 2000 15:53:08 EDT
From: abigail@delanet.com (Abigail)
Subject: Re: How to Concatenate
Message-Id: <slrn8kl2fc.mlf.abigail@alexandra.delanet.com>
Larry Rosler (lr@hpl.hp.com) wrote on MMCDLXXXI September MCMXCIII in
<URL:news:MPG.13b4177b302e009398ab91@nntp.hpl.hp.com>:
&& [Crossposted and followups changed to comp.lang.perl.misc.]
&&
&& In article <39496b8e@news.victoria.tc.ca> on 15 Jun 2000 16:49:34 -0800,
&& Malcolm Dew-Jones <yf110@vtn1.victoria.tc.ca> says...
&& > Huy Trinh (htrinh@bigfoot.com) wrote:
&& >
&& > : What function do I use to concatenate two or more strings? Thanks!
&& >
&& > read perlop.pod
&& >
&& > $string1 = 'this is a string';
&& > $string2 = ' and another string';
&& >
&& > $concatenated_string = $string1 . $string2 ;
&&
&& Every time this question is asked, someone posts 'all' the other ways to
&& do it. So let me try:
&&
&& $concatenated_string = "$string1$string2";
&&
&& $concatenated_string = join "" => $string1, $string2;
&&
&& $concatenated_string = pack 'A* A*' => $string1, $string2;
&&
&& ($concatenated_string = $string1) .= $string2;
&&
&& ($concatenated_string = $string1) =~ s/\z/$string2/;
&&
&& More???
substr (($concatenated_string = $string1), length ($string1),
length ($string2), $string2);
Abigail
--
perl -e '$_ = q *4a75737420616e6f74686572205065726c204861636b65720a*;
for ($*=******;$**=******;$**=******) {$**=*******s*..*qq}
print chr 0x$& and q
qq}*excess********}'
------------------------------
Date: Fri, 16 Jun 2000 20:00:18 GMT
From: mcafee@waits.facilities.med.umich.edu (Sean McAfee)
Subject: Re: How to Concatenate
Message-Id: <mHv25.241$Gq3.5792@news.itd.umich.edu>
In article <MPG.13b4177b302e009398ab91@nntp.hpl.hp.com>,
Larry Rosler <lr@hpl.hp.com> wrote:
>[Crossposted and followups changed to comp.lang.perl.misc.]
>> $concatenated_string = $string1 . $string2 ;
>Every time this question is asked, someone posts 'all' the other ways to
>do it. So let me try:
> $concatenated_string = "$string1$string2";
> $concatenated_string = join "" => $string1, $string2;
> $concatenated_string = pack 'A* A*' => $string1, $string2;
> ($concatenated_string = $string1) .= $string2;
> ($concatenated_string = $string1) =~ s/\z/$string2/;
substr($concatentad_string = $string1, length($string1), 0, $string2);
($concatenated_string = $string2) =~ s/^/$string1/;
($concatenated_string = $string2) =~ s/(?=\Q$string2\E)/$string1/;
($concatenated_string = $string1) =~ s/(?<=\Q$string1\E)/$string2/;
($concatenated_string) = map { "$string1$_" } $string2;
($concatenated_string) = map { "$_$string2" } $string1;
$concatenated_string = sub { local $"; "@_" }->($string1, $string2);
$concatenated_string = do { local $^A; formline('@*@*',$string1,$string2); $^A};
This is just getting too silly.
--
Sean McAfee mcafee@umich.edu
print eval eval eval eval eval eval eval eval eval eval eval eval eval eval
q!q@q#q$q%q^q&q*q-q=q+q|q~q:q? Just Another Perl Hacker ?:~|+=-*&^%$#@!
------------------------------
Date: Fri, 16 Jun 2000 20:45:30 GMT
From: clintp@geeksalad.org (Clinton A. Pierce)
Subject: Re: How to Concatenate
Message-Id: <Klw25.2597$fR2.30780@news1.rdc1.mi.home.com>
[Posted and mailed]
In article <MPG.13b4177b302e009398ab91@nntp.hpl.hp.com>,
Larry Rosler <lr@hpl.hp.com> writes:
> [Crossposted and followups changed to comp.lang.perl.misc.]
>
> Every time this question is asked, someone posts 'all' the other ways to
> do it. So let me try:
> [..]
>
> More??? I'm sure there are also plenty of really inefficient
> (character-by-character) ways, better not to be posted.
Or we skip all of the string functions, and do it with I/O:
if (open(F, "|-")) {
print F $string1, $string2;
close(F);
} else {
local $/=undef;
$concat_string=<STDIN>;
}
--
Clinton A. Pierce Teach Yourself Perl in 24 Hours!
clintp@geeksalad.org for details see http://www.geeksalad.org
"If you rush a Miracle Man,
you get rotten Miracles." --Miracle Max, The Princess Bride
------------------------------
Date: 16 Jun 2000 18:44:12 GMT
From: db7654321@aol.comspamsux (David Bell)
Subject: Re: I can't figure this one out... (Newbie question)
Message-Id: <20000616144412.15905.00007890@ng-md1.aol.com>
OK, I changed everything, but still have problems. Here is the updated code:
#!/usr/bin/perl -w
$true = "no";
$num = 0;
$userfile = "/home/david/perl/users";
open(USER, $userfile) || die "Can't open $userfile $!";
@user = qw(<USER>);
close(USER);
open(USERINFO, "id -un|") || die "Can't open id -un $!";
$userinfo = <USERINFO>;
close(USERINFO);
chomp ($userinfo);
open(WRITEUSER, ">>$userfile") || die "Can't open $userfile $!";
while($true eq "no") {
if ($user[$num] eq $userinfo) {
print "\n\tYou're already using the internet.\n\n";
$true = "yes";
} elsif ($num < 9) {
$num = ++$num;
} else {
print WRITEUSER "$userinfo ";
print "\n\tYou're on the list now!\n\n";
$true = "yes";
}
}
close(WRITEUSER);
I see from using 'print' that the value of @user is <USER> instead of the
contents of $userfile... How can I get @user to be the contents of $userfile?
...Then how can I make the program count the entrys in $userfile (to replace
the 9 in $num < 9 with the counted words)? Thanks!
>>>>>> "DB" == David Bell <db7654321@aol.comspamsux> writes:
>
> DB> #!/usr/bin/perl -w
>
>good, you use -w. that is warning you about your (potential) bugs
>
>learn to use strict as well.
>
> DB> open(USER, "$userfile");
>
>no need for the quotes there, in fact it is wrong in many case.
>
>and ALWAYS check for the success of opne and other system calls
>
> open(USER, $userfile) || die "can't open $userfile $!" ;
>
> DB> $user = <USER>;
> DB> @users = qw($user);
>
>that is a very bogus line. it is assigning the string '$user' to the
>first element of @users. it is surely not what you intend. and it is the
>cuase of your loop warning.
>
> DB> open(USERINFO, "id -un|");
>
>no checking for success
>
> DB> open(WRITEUSER, ">>$userfile");
>
>one more time, no checking
>
> DB> while($true eq "no") {
> DB> if ($users[$num] eq $userinfo) {
>
>that is the line in the warning. you onl have one element in @users, so
>when the loop counter $num > 1 you are using uninitialized slots of @users.
>
-------------------------
David Bell - Otherwise known as DB7654321
Remember to remove nospam, notrash or anything odd looking from my email
address. :)
------------------------------
Date: Fri, 16 Jun 2000 15:05:32 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: I can't figure this one out... (Newbie question)
Message-Id: <394A7A7C.3488732F@attglobal.net>
David Bell wrote:
> I see from using 'print' that the value of @user is <USER> instead of the
> contents of $userfile... How can I get @user to be the contents of $userfile?
@user = qw(<USER>); # <--bad bad bad
Check perldoc perlop for the section on quotes and quote like operators.
What you want to put here is:
open USER, $userfile or die "can't open file: $!\n";
chomp(@users = <USER>); #no quotes around <USER>, see?
close USER;
Now @users has the contents of the file, one index per line,
as its contents.
> ...Then how can I make the program count the entrys in $userfile (to replace
> the 9 in $num < 9 with the counted words)? Thanks!
I think you are wanting to loop for each entry in the array?
Using an array as a scalar will yield the count, so
$num < $users ($users is the count of values in @users)
But I can't see what you are trying to accomplish, so Im not sure
this will actually be usefull. If you instead want to make a logic
test once for each entry in an array, maybe something like a for()
loop is what you really want:
for(@users)
{
if ($_ eq $userinfo)
{
print "\n\tYou're already using the internet.\n\n";
}
else
{
print WRITEUSER "$userinfo\n";
print "\n\tYou're on the list now!\n\n";
}
}
And while I'm here, this:
open(USERINFO, "id -un|") || die "Can't open id -un $!";
$userinfo = <USERINFO>;
close(USERINFO);
chomp ($userinfo);
could be written as this:
chomp($userinfo = `id -un`);
Maybe if you post an example of the file you are reading/writing from
and a bit clearer idea of what you want accomplished, we can help
some more.
------------------------------
Date: Fri, 16 Jun 2000 12:35:14 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: I can't figure this one out... (Newbie question)
Message-Id: <MPG.13b4214d2fc254c198ab92@nntp.hpl.hp.com>
[Rearranged for logical sequencing. Please don't post entire articles
when you respond, and especially don't post them 'Jeopardy-style'
(answer before question).
Also, putting words such as 'newbie' in your Subject ensures that many
potential readers won't see it. So don't do that!]
In article <20000616144412.15905.00007890@ng-md1.aol.com> on 16 Jun 2000
18:44:12 GMT, David Bell <db7654321@aol.comspamsux> says...
>
> >>>>>> "DB" == David Bell <db7654321@aol.comspamsux> writes:
You have your own attribution, but cut out Uri Guttman's.
> > DB> #!/usr/bin/perl -w
> >
> >good, you use -w. that is warning you about your (potential) bugs
> >learn to use strict as well.
>
> OK, I changed everything, but still have problems. Here is the updated code:
>
> #!/usr/bin/perl -w
So why did you ignore Uri's very sound advice regarding the use of 'use
strict;'?
> $true = "no";
Boolean switches are better handled as such, rather than as strings to
be tested against. The following initializes $true to FALSE:
my $true;
> $num = 0;
> $userfile = "/home/david/perl/users";
> open(USER, $userfile) || die "Can't open $userfile $!";
> > DB> @users = qw($user);
> >
> >that is a very bogus line. it is assigning the string '$user' to the
> >first element of @users. it is surely not what you intend. and it is the
> >cuase of your loop warning.
> @user = qw(<USER>);
You seem to have a great fondness for 'qw', which is a quoting operator
that produces string literals. Read about it in perlop, and don't use
it until you understand it.
my @user = <USER>;
And don't forget to chomp off the newlines that you are going to put in
(see below):
chomp(my @user = <USER>);
...
> while($true eq "no") {
until ($true) {
But that still isn't the Perlish way of doing it.
while () {
and use the 'last' function to break out of the loop.
> if ($user[$num] eq $userinfo) {
> print "\n\tYou're already using the internet.\n\n";
> $true = "yes";
> } elsif ($num < 9) {
> $num = ++$num;
That is a ghastly statement, because it changes $num twice, and you
can't be sure what order things happen. Just incrementing is enough.
> } else {
> print WRITEUSER "$userinfo ";
That space should be "\n", or @user will have only one element.
> print "\n\tYou're on the list now!\n\n";
> $true = "yes";
> }
> }
> close(WRITEUSER);
>
>
> I see from using 'print' that the value of @user is <USER> instead of the
> contents of $userfile... How can I get @user to be the contents of $userfile?
As shown above. Kill the qw().
> ...Then how can I make the program count the entrys in $userfile (to replace
> the 9 in $num < 9 with the counted words)? Thanks!
$num = @users;
But you don't need to know it.
Here is a better way of doing what you want (append the new entry to the
output file unless it is found), heavily modified from the final example
in perlfaq4: "How can I tell whether a list or array contains a certain
element?":
my $is_there;
$is_there = $_ eq $userinfo and last for @users;
if ($is_there) {
print "\n\tYou're already using the internet.\n\n";
} else {
print WRITEUSER "$userinfo\n";
print "\n\tYou're on the list now!\n\n";
}
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Fri, 16 Jun 2000 12:39:34 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: I can't figure this one out... (Newbie question)
Message-Id: <MPG.13b42250bb6bcf1898ab93@nntp.hpl.hp.com>
In article <394A7A7C.3488732F@attglobal.net> on Fri, 16 Jun 2000
15:05:32 -0400, Drew Simonis <care227@attglobal.net> says...
...
> But I can't see what you are trying to accomplish, so Im not sure
> this will actually be usefull. If you instead want to make a logic
> test once for each entry in an array, maybe something like a for()
> loop is what you really want:
>
> for(@users)
> {
> if ($_ eq $userinfo)
> {
> print "\n\tYou're already using the internet.\n\n";
> }
> else
> {
> print WRITEUSER "$userinfo\n";
> print "\n\tYou're on the list now!\n\n";
> }
> }
No. He wants to append once only, if the element isn't found, not once
for every element in the array until the element is found.
I posted the solution adapted from the FAQ.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Fri, 16 Jun 2000 16:05:33 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: I can't figure this one out... (Newbie question)
Message-Id: <394A888D.64A382C0@attglobal.net>
Larry Rosler wrote:
>
> No. He wants to append once only, if the element isn't found, not once
> for every element in the array until the element is found.
>
> I posted the solution adapted from the FAQ.
Now that you mention it, I see how my strange solution would have
quickly created a very big text file with lots of identical entries.
------------------------------
Date: Fri, 16 Jun 2000 20:29:30 GMT
From: marcel@gandalf.local (Marcel Grunauer)
Subject: Re: I can't figure this one out... (Newbie question)
Message-Id: <slrn8kl3pg.h3.marcel@gandalf.local>
On 16 Jun 2000 16:22:10 GMT, David Bell <db7654321@aol.comspamsux> wrote:
>Hello! I've been writing a little perl program to keep track of users
>connecting to the internet. I'm very new to perl (I bought 'Learning
>Perl' a couple weeks ago. Good book), and programming in general, and
>have run into some problems that I can't figure out. Please respond in
>small words. :) Here is the code (after a few hours of fiddling with
>it.) :
>#!/usr/bin/perl -w
You should "use strict" here, which will help you with catching errors
(read its documentation: 'perldoc strict'). You will have to declare
variables like this under strict:
my $num;
>$true = "no";
>$num = 0;
>$userfile = "/home/david/perl/users";
>open(USER, "$userfile");
You should always check the return value of system calls, like this:
open(USER, $userfile) or die "can't open $userfile: $!\n";
And it is not necessary to put the $userfile in quotes; Perl knows how
to deal with the value of $userfile.
>$user = <USER>;
>@users = qw($user);
>close(USER);
Here you only read the first user, then you make a one-element list where
the first element is the string "$user" (not the value of the variable,
as you might have intended; that is to say, qw() does not interpolate
variables.
I think you might have wanted
my @users = <USER>;
close(USER) or die "can't close $userfile: $!\n";
However, what you really might have wanted is a hash (see below).
>open(USERINFO, "id -un|");
>$userinfo = <USERINFO>;
>close(USERINFO);
>chomp ($userinfo);
>open(WRITEUSER, ">>$userfile");
>while($true eq "no") {
> if ($users[$num] eq $userinfo) {
> print "\n\tYou're already using the internet.\n\n";
> $true = "yes";
> } elsif ($num < 10) {
> $num = ++$num;
$num++;
> } else {
> print WRITEUSER "$userinfo ";
> print "\n\tYou're on the list now!\n\n";
> $true = "yes";
> }
>}
>close(WRITEUSER);
>
[snip]
>
>When run, I get this error:
>
>Name "main::user" used only once: possible typo at ./test3 line 6.
See explanation of 'qw($user)' above.
>Use of uninitialized value at ./test3 line 15.
>Use of uninitialized value at ./test3 line 15.
[...]
These would be the uninitialized array elements.
Use a hash. Hashes have strings as keys, they are not numbered, so you
can check for the existence of a key (a user, in your case) in O(1). E.g.,
open(USER,$userfile) or die "can't open $userfile: $!\n";
%users = map { chomp; $_ => 1 } <USERS>;
map iterates over a list and executes the code in the braces for each
element (cf. 'perldoc -f map'). In this case, it creates a key/value pair,
so if you have a userfile containing the lines
tom
dick
harry
the map creates a list ('tom', 1, 'dick', 1, 'harry', 1). The '=>'
is roughly equivalent to a comma here. This list is then assigned to a
hash, which interprets element pairs as keys and values, so you end up
with a hash that looks like
%h = (
'tom' => 1,
'dick' => 1,
'harry' => 1,
);
Now looking up whether a user $u exists is as simple as
if (exists $h{$u}) {
...
}
This way you can dispense with the array and the loop.
--
Marcel
sub AUTOLOAD{($_=$AUTOLOAD)=~s;^.*::;;;y;_; ;;print} Just_Another_Perl_Hacker();
------------------------------
Date: Fri, 16 Jun 2000 21:16:24 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: I can't figure this one out... (Newbie question)
Message-Id: <skl698bqis416@corp.supernews.com>
David Bell (db7654321@aol.comspamsux) wrote:
: OK, I changed everything, but still have problems. Here is the updated code:
[snip]
: @user = qw(<USER>);
You're still not getting how qw works. This time @user ends up with one
element in it, the string '<USER>'. Are you trying to split the first
line read from USER on whitespace and store the resulting values into
@user? If so,
@user = split ' ', <USER>;
will do the trick. qw is just a shorthand way of initializing a list of
compile-time constant values.
: open(USERINFO, "id -un|") || die "Can't open id -un $!";
: $userinfo = <USERINFO>;
: close(USERINFO);
On pipes, useful errors are more often trapped at close time than at open.
Error check both.
--
| Craig Berry - http://www.cinenet.net/users/cberry/home.html
--*-- "Beauty and strength, leaping laughter and delicious
| languor, force and fire, are of us." - Liber AL II:20
------------------------------
Date: Fri, 16 Jun 2000 17:20:15 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: I can't figure this one out... (Newbie question)
Message-Id: <394A9A0F.C6F01CA7@attglobal.net>
Craig Berry wrote:
>
> : open(USERINFO, "id -un|") || die "Can't open id -un $!";
> : $userinfo = <USERINFO>;
> : close(USERINFO);
>
Bah. Why use that syntax when you are only getting a logon name?
chomp($userinfo = `id -un`);
------------------------------
Date: Fri, 16 Jun 2000 19:46:08 GMT
From: Antonio Gonzalez <antonio_gonzalez@wap3.net>
Subject: Re: Login and passwords
Message-Id: <j3vMNipLq6qCOOB4O0HatBJr8+bj@4ax.com>
On Fri, 16 Jun 2000 09:30:02 -0400, Jeff Boes <jboes@eoexchange.com>
wrote:
>> Sort of like a web based email (hotmail) - that has login and passwords.
>> This would grant access to an account.
Why do you want to do that?
Too many servers out there giving web-based hotmail-like
email for free.
------------------------------
Date: 16 Jun 2000 18:03:59 GMT
From: petolino@Eng.Sun.COM (Joe Petolino)
Subject: Re: looking for a 'diff' like comparison routine?
Message-Id: <8idq6f$3il$1@engnews3.Eng.Sun.COM>
Robert Chalmers <robert@chalmers.com.au> wrote:
>I need a script that will compare two text files (a) and (b) - rows of text
>up to 80 chars each row, and print a list of the rows that appear in the
>first file (a), that do not appear in the second file (b)
There's a perl implementation of diff on the PPT page:
http://language.perl.com/ppt/src/diff/index.html
It uses the Algorithm::Diff module, which you can find on CPAN.
-Joe
--
Joe Petolino petolino@eng.sun.com
------------------------------
Date: Fri, 16 Jun 2000 20:07:10 GMT
From: robb4444@my-deja.com
Subject: Re: LWP::SecureSocket and https
Message-Id: <8ie1d0$883$1@nnrp1.deja.com>
You're right. All you need is HTTP::Request and LWP::UserAgent.
You treat HTTPS requests like HTTP requests... just look at the LWP
Cookbook in ActivePerl documentation.
Robb
In article <392ef04e.1981224@news.club-internet.fr>,
you_know_who_am_i@hotmail.com wrote:
> irenaro@my-deja.com wrote:
> >I tryied to do the same with:
> >$req = new HTTP::Request 'POST' =>
> >'https://www.server.com/file.cgi....";
> >and as I understood i'm able to get only files from HTTP and not
HTTPS.
> >
> >Can somebody tell me what is a right way to get pages from HTTPS?
>
> For me it works perfectly under Win32.
> Just take:
> http://www.activestate.com/packages/zips/Crypt-SSLeay.zip
>
> Nothing else is needed,
> Good luck,
> --
> SBoyV
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 16 Jun 2000 21:19:20 GMT
From: jonceramic@nospammiesno.earthlink.net (Jon S.)
Subject: Re: MacPerl- Back to square one.
Message-Id: <394a9ad6.29035527@news.earthlink.net>
On Thu, 15 Jun 2000 22:50:28 +0100, "B Kemp" <hyagillot@tesco.net>
wrote:
>A Mac has appeared in my office and I'm supposed to do something with it.
>There don't seem to be specific newsgroups, can't even seem to find an
>active general one.
>Help!
>
>I must admit it has all sorts of nice tools and camel icons for your files -
>and a very nice animated camel mouse pointer, but its all still a bit odd.
>Nice bit was having lines with syntax errors gettin highlighted in the
>Macperl tools. I have actually got it to do all the things I was after so
>perhaps that's that.
>
>I even have a European Mac keyboard, which doesn't sm to have a # sign!
>To show how useless we were, we wondered why the mouse cable was too short
>for us to be able to plug it in the back and use it. (We know now, answers
>on a postcard ...)
>
>So, if you want a question rather than idle chatter:-
>Information? Where from?
>I get the impression that standard CPAN modules stand no chance on a Mac-
>true? false?
You might also install linux on the machine. SuSE has a distribution
among others that are PPC specific like Yellow Dog.
comp.sys.mac.system is a good generic user community.
comp.os.linux.powerpc is a good Linux on Mac site.
Best of Luck,
Jon
------------------------------
Date: Fri, 16 Jun 2000 15:15:08 -0500
From: Digitali Binar <digitali@systemmedics.com>
Subject: Newbie Question
Message-Id: <ep1lks0qc2jchvar69sq4l6nuim80n51pj@4ax.com>
I've recently been tasked to transfer a website from one host to
another. The trouble starts when the shopping cart is invoked.
It seems that when the 'Add to Cart' button is pressed, you are taken
to an error page that states that one isn't authorized to view the
page.
The Perl5 script for cart.pl follows:
__________________________________
#!/usr/bin/local/perl
use lib '/www/lib/perl5/site_perl/HC';
use CGI qw(:standard);
use CGI::Cookie;
use HC::Cart;
use HC::Item;
use strict;
my $query = new CGI;
my $cart = new HC::Cart;
The server is running on FreeBSD and Perl5 is installed. The module
is called is cart.pl. When I try to install the module in Perl
(% perl5 www/cgi-bin/cart.pl), I get the following error:
Can't locate HC/Cart.pm in @INC (@INC contains:
/www/lib/perl5/site_perl
/usr/libdata/perl/5.00503/mach
/usr/libdata/perl/5.00503
/usr/local/lib/perl5/site_perl/5.005/i386-freebsd
/usr/local/lib/perl5/site_perl/5.005 .)
at www/cgi-bin/cart.pl line 7.
On line 7, there is a call to cart.pm, but it's located in the correct
directory.
I'm familiar with HTML, but not Perl. The troubleshooting that we've
done indicates that the path to HC/Cart.pm is invalid. We've checked
& doublechecked the path and ensured that it is located where it's
supposed to be.
Any assistance would be highly appreciated. Thanks.
dB
------------------------------
Date: Sat, 17 Jun 2000 08:57:37 +1200
From: "Tintin" <you.will.always.find.him.in.the.kitchen@parties>
Subject: Re: Newbie Question
Message-Id: <961188969.497806@shelley.paradise.net.nz>
"Digitali Binar" <digitali@systemmedics.com> wrote in message
news:ep1lks0qc2jchvar69sq4l6nuim80n51pj@4ax.com...
> I've recently been tasked to transfer a website from one host to
> another. The trouble starts when the shopping cart is invoked.
>
> It seems that when the 'Add to Cart' button is pressed, you are taken
> to an error page that states that one isn't authorized to view the
> page.
>
> The Perl5 script for cart.pl follows:
> __________________________________
>
> #!/usr/bin/local/perl
>
> use lib '/www/lib/perl5/site_perl/HC';
>
> use CGI qw(:standard);
> use CGI::Cookie;
> use HC::Cart;
> use HC::Item;
> use strict;
>
> my $query = new CGI;
> my $cart = new HC::Cart;
>
> The server is running on FreeBSD and Perl5 is installed. The module
> is called is cart.pl. When I try to install the module in Perl
> (% perl5 www/cgi-bin/cart.pl), I get the following error:
>
> Can't locate HC/Cart.pm in @INC (@INC contains:
> /www/lib/perl5/site_perl
> /usr/libdata/perl/5.00503/mach
> /usr/libdata/perl/5.00503
> /usr/local/lib/perl5/site_perl/5.005/i386-freebsd
> /usr/local/lib/perl5/site_perl/5.005 .)
> at www/cgi-bin/cart.pl line 7.
>
> On line 7, there is a call to cart.pm, but it's located in the correct
> directory.
It's located in the directory you think it is, but looking at the error
message, I'd say it is really in /usr/local/lib/perl5/site_perl/HC
------------------------------
Date: Fri, 16 Jun 2000 14:05:19 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: OT: Re: A Computer Programmers Profile
Message-Id: <MPG.13b4366cf9f8857a98ab94@nntp.hpl.hp.com>
In article <394A7DE2.4D6B9D90@rac.ray.com> on Fri, 16 Jun 2000 14:20:02
-0500, Russ Jones <russ_jones@rac.ray.com> says...
> Larry Rosler wrote:
> >
> > Drew Simonis wrote:
> > > Ferk Da Jerk wrote:
> > > > children are more stronger than the adults.
> > > ^^^^^^^^^^^^^
> > > And oh the grammer!
> >
> > Is that Kelsey Grammer or English grammar?
>
> Poor grammar is one thing up with which we must not put.
>
> - Winston Churchill
I thought that was 'Ending a sentence with a preposition is one thing up
with which we must not put.'
Which reminds me of the convict who was knifed to death in the prison
shower room. He ended his sentence with a proposition.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Fri, 16 Jun 2000 17:22:11 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: OT: Re: A Computer Programmers Profile
Message-Id: <394A9A83.F5E6860C@attglobal.net>
Larry Rosler wrote:
>
>
> Which reminds me of the convict who was knifed to death in the prison
> shower room. He ended his sentence with a proposition.
Oh my. That is rather funny.
------------------------------
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 3395
**************************************