[17695] in Perl-Users-Digest
Perl-Users Digest, Issue: 5115 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Dec 14 18:10:39 2000
Date: Thu, 14 Dec 2000 15:10:19 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <976835419-v9-i5115@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 14 Dec 2000 Volume: 9 Number: 5115
Today's topics:
Checking SSL certs from perl? <arlo_ihrig@intuit.com>
dclone [Was Re: Dereferencing hash within hash] (James Kufrovich)
Re: Dereferencing hash within hash nobull@mail.com
Re: Dereferencing hash within hash (Garry Williams)
Re: Dereferencing hash within hash <ren.maddox@tivoli.com>
Re: Eliminating unneeded whitespace... <ren.maddox@tivoli.com>
first-post email FAQ (was Re: Posting Guidelines for co (Tad McClellan)
Having problem with GD.pm nodo70@my-deja.com
Re: How do I get the last day of a month?? (Garry Williams)
Re: How do I get the last day of a month?? <bart.lateur@skynet.be>
IO::Socket - The server will not reply back to the clie (Richard Zilavec)
Re: Mathematics in Perl <syvinski@ameritech.net>
Re: My first JAPH.... (Adam Spragg)
Re: My first JAPH.... (Richard Zilavec)
need https version of lwp-download <replytousenet@usenet.com>
Re: need https version of lwp-download <mbudash@sonic.net>
Re: need https version of lwp-download nobull@mail.com
Re: need https version of lwp-download <mbudash@sonic.net>
Numbers to strings bentmon@my-deja.com
numbers to strings <bentmon@my-deja.com>
Re: Numbers to strings (Tom Christiansen)
Re: numbers to strings <mbudash@sonic.net>
Re: Numbers to strings <joejava@dragonat.net>
Re: numbers to strings <bcaligari@my-deja.com>
Re: numbers to strings (Tom Christiansen)
perl5.6.1 for win32 <dwl@slip.net>
Re: perl5.6.1 for win32 <camerond@mail.uca.edu>
pipes and file i/o (Evanda Remington)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 14 Dec 2000 19:48:50 GMT
From: "Arlo Ihrig" <arlo_ihrig@intuit.com>
Subject: Checking SSL certs from perl?
Message-Id: <Cu9_5.3365$h67.297455@newsread1.prod.itd.earthlink.net>
Hello,
Does anyone know of a script or module for checking an SSL cert from perl?
I'd like to run a script to verify that several servers are not out of date
with their certs.
Any help would be greatly appreciated.
Thank you.
-Arlo Ihrig
------------------------------
Date: Thu, 14 Dec 2000 22:05:24 GMT
From: eggie@REMOVE_TO_REPLYsunlink.net (James Kufrovich)
Subject: dclone [Was Re: Dereferencing hash within hash]
Message-Id: <slrn93ih9e.925.eggie@melody.mephit.com>
On Thu, 14 Dec 2000 20:31:03 GMT, Garry Williams <garry@ifr.zvolve.net> wrote:
>On Thu, 14 Dec 2000 18:29:59 GMT, Dave Sherohman <esper@news.visi.com>
>wrote:
>
>>Although this does answer my standing curiousity about {} being used both for
>>code blocks and hash keys: hash keys _are_ code blocks.
>
>Yes; code blocks that return strings.
Hrmm, would this explain a slight problem I had with dclone? I
have data stored as a hash of hashes as an MLDBM dbm file (with DB_FILE
and Storable), and tied to %hash. But running dclone on \%hash gives a
"cannot use CODE" error, or something along those lines. I was trying to
run dclone on the hash because every time one accesses the data in the
tied hash, it calls the appropriate FETCH method, so the MLDBM man page
says. So just make a copy of the tied hash in one fell swoop, then read
the data from there, was my reasoning. Is that a reasonable approach, or
would running dclone call FETCH just as many times?
Jamie Kufrovich
--
Egg, eggie@sunlink.net
FMSp3a/MS3a A- C D H+ M+ P+++ R+ T W Z+
Sp++/p# RLCT a+ cl++ d? e++ f h* i+ j p+ sm+
------------------------------
Date: 14 Dec 2000 19:06:46 +0000
From: nobull@mail.com
Subject: Re: Dereferencing hash within hash
Message-Id: <u9d7eu6cvt.fsf@wcl-l.bham.ac.uk>
esper@news.visi.com (Dave Sherohman) writes:
> On Thu, 14 Dec 2000 18:12:35 GMT, Garry Williams <garry@ifr.zvolve.net> wrote:
> > That's because `%$req_queue{$req}' parses as `%{$req_queue}{$req}' and
> > $req_queue was never declared. What you wanted was
> >
> > `%{ $req_queue{$req} }'
>
> That worked; thanks. So why does this work with {} but not ()? If the
> problem is with the order in which the parser sets symbols to associate with
> each other, shouldn't parens override that order?
The dereferencing syntax is explained in perlref as:
Anywhere you'd put an identifier (or chain of
identifiers) as part of a variable or subroutine name,
you can replace the identifier with a BLOCK returning
a reference of the correct type.
Why it was chosen this way I'm not quite sure.
> Although this does answer my standing curiousity about {} being used both for
> code blocks and hash keys: hash keys _are_ code blocks.
Oh no there are not:
print $foo{1;2}; # Syntax error
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Thu, 14 Dec 2000 20:31:03 GMT
From: garry@ifr.zvolve.net (Garry Williams)
Subject: Re: Dereferencing hash within hash
Message-Id: <b6a_5.1045$uF3.65434@eagle.america.net>
On Thu, 14 Dec 2000 18:29:59 GMT, Dave Sherohman <esper@news.visi.com>
wrote:
>On Thu, 14 Dec 2000 18:12:35 GMT, Garry Williams <garry@ifr.zvolve.net> wrote:
>> That's because `%$req_queue{$req}' parses as `%{$req_queue}{$req}' and
>> $req_queue was never declared. What you wanted was
>>
>> `%{ $req_queue{$req} }'
>
>That worked; thanks. So why does this work with {} but not ()? If the
>problem is with the order in which the parser sets symbols to associate with
>each other, shouldn't parens override that order?
Because %(...) is a syntax error. Dereferencing is explained in the
perlref manual page. In particular, you wanted the second method that
is desribed (out of three methods to dereference):
2. Anywhere you'd put an identifier (or chain of
identifiers) as part of a variable or subroutine name,
you can replace the identifier with a BLOCK returning a
reference of the correct type. ^^^^^
...
Because of being able to omit the curlies for the simple
case of `$$x', people often make the mistake of viewing
the dereferencing symbols as proper operators, and
wonder about their precedence. If they were, though,
you could use parentheses instead of braces. That's not
the case.
The BLOCK is required by the syntax. The `%' is *not* an operator.
>Although this does answer my standing curiousity about {} being used both for
>code blocks and hash keys: hash keys _are_ code blocks.
Yes; code blocks that return strings.
--
Garry Williams
------------------------------
Date: 14 Dec 2000 13:04:16 -0600
From: Ren Maddox <ren.maddox@tivoli.com>
Subject: Re: Dereferencing hash within hash
Message-Id: <m3u286ddu7.fsf@dhcp11-177.support.tivoli.com>
esper@news.visi.com (Dave Sherohman) writes:
> I've got a hash of hashes and it seems to be behaving oddly when I try to
> extract one of the contained hashes... (Yes, I know I could just use
> $hoh{'key1'}{'key2'}. But I don't like that construct when the contained
> hash is going to be used repeatedly.)
>
> for my $req (keys %req_queue) {
> my %reqdata = $req_queue{$req};
> }
>
> starts up fine, but, of course, fails when it executes. ('Reference found
> where even-sized list expected')
$req_queue{$req} is a scalar that contains a *reference* to a hash.
Assigning a single scalar, no matter its contents, to a hash results
in that error.
> for my $req (keys %req_queue) {
> my %reqdata = %$req_queue{$req};
> }
>
> gives a compile-time error of 'Global symbol "$req_queue" requires explicit
> package name'. Even though the previous example didn't mind the
> $req_queue{$req}.
The "%" binds more tightly than the braces ("{}"). So this treats
$req_queue as a scalar containing a hash reference. You are
apparently using "strict" (which is very good), so you get an error
because the scalar $req_queue has not been declared.
> for my $req (keys %req_queue) {
> my %reqdata = %($req_queue{$req});
> }
>
> Adding parentheses makes it a lot mor interesting - 'Scalar found where
> operator expected near "%($req_queue" (Missing operator before $req_queue?)',
> followed by 'syntax error at ./ttsmon.pl line 108, near "%($req_queue"'
Adding parentheses was a good guess, but it doesn't work. Parentheses
are used for grouping of expressions, but not for grouping of
dereferencing operators. For those, you can use braces:
my %reqdata = %{$req_queue{$req}};
However, both that and what you found below...
> Finally,
>
> for my $req (keys %req_queue) {
> my $reqref = $req_queue{$req};
> my %reqdata = %$reqref;
> }
>
> actually works.
...have one significant drawback. They both make a copy of the, as
you put it, contained hash. Aside from the performance impact, any
changes will not be reflected in the larger structure. If you don't
mind a little extra syntax, you can avoid that problem. Grab a copy
of the reference to the hash just like you did above:
my $reqref = $req_queue{$req};
and then just dereference it when you need to get at the individual
hash elements:
print $reqref->{key2};
Have a look (or second, or third, or...) at perlref(1). Also,
perllol(1) has lots of good information about doing this with arrays,
but most of it applies pretty well to hashes. And finally, perldsc(1)
has a lot of examples, including some hashes of hashes.
--
Ren Maddox
ren@tivoli.com
------------------------------
Date: 14 Dec 2000 14:21:38 -0600
From: Ren Maddox <ren.maddox@tivoli.com>
Subject: Re: Eliminating unneeded whitespace...
Message-Id: <m3ae9yda99.fsf@dhcp11-177.support.tivoli.com>
Jeff Pinyan <jeffp@crusoe.net> writes:
> Benchmark: running join_split, regex_A_1, regex_A_2, regex_B_1, regex_B_2,
> each for at least 10 CPU seconds...
> join_split: 7112.80/s (n=74471)
> regex_A_1: 3177.52/s (n=32506)
> regex_A_2: 2984.96/s (n=30566)
> regex_B_1: 5044.14/s (n=51198)
> regex_B_2: 4991.71/s (n=50566)
>
> So in 10 seconds, join_split() got in the most iterations. The regex_A
> approach was slower than the regex_B approach.
I added an additional method:
sub tr_regex {
my $x = $str;
$x =~ tr/ \r\n\t\b/ /s;
$x =~ s/^\s//;
$x =~ s/\s$//;
$x;
}
Additionally, I am running:
This is perl, v5.6.0 built for i686-linux-thread-multi
My abbreviated results are:
join_split: 34642.35/s (n=368941)
regex_A_1: 19623.71/s (n=205264)
regex_A_2: 16799.61/s (n=174212)
regex_B_1: 44204.19/s (n=464586)
regex_B_2: 42244.18/s (n=442719)
tr_regex: 84835.57/s (n=923011)
Notably, with my version of Perl, regex_B_1 and regex_B_2 are
appreciably faster than join_split, so apparently the regex engine has
been improved for those conditions.
As I expected, the above code that uses tr to squeeze out the extra
whitespace is significantly faster than the other methods.
--
Ren Maddox
ren@tivoli.com
------------------------------
Date: Thu, 14 Dec 2000 10:20:23 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: first-post email FAQ (was Re: Posting Guidelines for comp.lang.perl.misc ($Revision: 0.1 $))
Message-Id: <slrn93hsq7.r2.tadmc@maxim.metronet.com>
Bart Lateur <bart.lateur@skynet.be> wrote:
>It looks remarkably much like the mail I got when I first posted to
>comp.lang.perl.misc with a new e-mail address. It got sent to every new
>poster (with an unmunged e-mail address -- duh!).
I asked this too, but got no response.
Can anyone verify that the first-post emailed FAQ is still operational?
>Doesn't this happen
>any more?
--
Tad McClellan SGML consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 14 Dec 2000 19:10:50 GMT
From: nodo70@my-deja.com
Subject: Having problem with GD.pm
Message-Id: <91b5vk$8ci$1@nnrp1.deja.com>
After I install GD (1.27.2) and GDGraph (1.32) by using PPM command. I
run a test.pl and it complaint the error as:
GD object version 1.27 does not match $GD::VERSION 0.0port_port_for_OS2
at C:/Perl/lib/DynaLoader.pm
line 219.
/code of test.pl/
#!perl
# Graph.pm example File
# Please see documentation for more info
use GD::Graph;
$graph = new Graph;
srand();
for ($i=0; $i<30; $i++) {
$num = int( rand()*20000 + 10000);
if (($i % 5) == 0) {
$label = "Sun";
}
else {
$label="";
}
$graph->data($num,$label);
}
$graph->title("Daily Web Site Hits");
$graph->subtitle("Content pages only");
$graph->keys_label("Day of the Week");
$graph->values_label("Hits");
$graph->value_min(0);
$graph->value_max(35000);
$graph->value_labels("10000,20000,30000");
$graph->background_image("bg.gif");
$graph->output("example.gif");
/code/
Perl version: v5.6.0 build 620
GD version: 1.27.2
GDGraph version: 1.32
Anyone has any suggestion or point out what I did wrong?
Thanks,
noDo
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Thu, 14 Dec 2000 20:14:24 GMT
From: garry@ifr.zvolve.net (Garry Williams)
Subject: Re: How do I get the last day of a month??
Message-Id: <AS9_5.1044$uF3.65401@eagle.america.net>
On Thu, 14 Dec 2000 13:33:42 -0500, Jeff Pinyan <jeffp@crusoe.net> wrote:
>On Dec 14, Jeff Pinyan said:
>> $next_month = timelocal(0,0,0, 1, $mon, 1900+$year);
>
>Scratch that 1900+ there
>
> $next_month = timelocal(0,0,0, 1, $mon, $year);
Actually, the timelocal() function has been updated to allow your
original expression to be interpreted correctly. I have no idea why
this was done (I think it's stupid and wrong), but it was. Here's the
manual page quote (perl-5.6.0):
Strictly speaking, the year should also be specified in a
form consistent with localtime(), i.e. the offset from 1900.
In order to make the interpretation of the year easier for
humans, however, who are more accustomed to seeing years as
two-digit or four-digit values, the following conventions
are followed:
o Years greater than 999 are interpreted as being the
actual year, rather than the offset from 1900. Thus,
1963 would indicate the year Martin Luther King won the
Nobel prize, not the year 2863.
...
--
Garry Williams
------------------------------
Date: Thu, 14 Dec 2000 22:59:05 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: How do I get the last day of a month??
Message-Id: <puji3tsaqoej3uv3bqctej16jusvv8kbp1@4ax.com>
Coolc wrote:
>I have a simple question...
>How do you get perl to return the last VALID numerical day of a
>particular month?
Assuming the month is 0 for january till 11 for december, and the year
in 4 digit format, here's a function:
sub days_in_month {
my($month, $year) = @_;
if(--$month) {
# not february
if($month<0) {
# january
return 31;
} else {
# 5 month cycle
return 31-(--$month%5)%2;
}
} else {
# february
# $year in 4 digits
return $year%4?28:$year%100?29:$year%400?28:29;
}
}
You can also use Time::Local, get the first day of the next month,
subtract a day (24*60*60 seconds), and get the day number. Either use
gtmtime()/timegm(), or use midday or another safe time when using
localtime()/timelocal(), because of DST issues.
--
Bart.
------------------------------
Date: Thu, 14 Dec 2000 22:38:05 GMT
From: rzilavec@tcn.net (Richard Zilavec)
Subject: IO::Socket - The server will not reply back to the client
Message-Id: <3a3d468f.187599601@news.tcn.net>
After transferring a file I would like my server to reply to my client
to confirm the file made it. Now the file does get there as expected
but the client, maybe server just hangs....
# client
$socket = IO::Socket::INET->new(
PeerAddr => $host,
PeerPort => $port,
Proto => "tcp",
Type => SOCK_STREAM
) || die "Can't connect to socket: $@\n";
$socket->autoflush(1);
open(IN, "< some.data") || die "Can't open file: $!\n";
for(<IN>) { print $socket $_; }
close(IN);
# this seems to be where it hangs
my $response = <$socket>;
print $response . "\n";
$socket->shutdown;
# server
$server = IO::Socket::INET->new(
LocalPort => $server_port,
Type => SOCK_STREAM,
Reuse => 1,
Listen => 5
) || die "$@\n";
$server->autoflush(1);
while($client = $server->accept()) {
my(@in, $time);
@in = <$client>;
# I really thought this would work my book even shows it??
print $client "I got the file\n";
}
$server->shutdown;
autoflush
- does this just prevent buffering?
- who using it, the client or the server
--
Richard Zilavec
rzilavec@tcn.net
------------------------------
Date: Thu, 14 Dec 2000 14:50:59 -0500
From: "Wayne M. Syvinski" <syvinski@ameritech.net>
Subject: Re: Mathematics in Perl
Message-Id: <qB9_5.599$4Z5.56169@nntp0.chicago.il.ameritech.net>
I did something like this a few months ago to check the precision and
mathematical computational speed of Perl in Windows.
I evaluated (pi/2)[Integral](0) sin(x) dx (which is precisely 1) using
Simpson's Rule.
I played with this, and then decided I could place any function in there I
wanted by using eval(). I used a simple regex to replace any "x" with the
scalar variable $x, then used the limits to calculate.
Unfortunately, I don't have the script anymore - I lost it when I upgraded
(yes, compared to Win98 it is an upgrade) to Win2K.
"Kyle Parfrey" <kyle@iol.ie> wrote in message
news:3A33F219.E94EF7F3@iol.ie...
> Hello all:
> I want to write a script that takes a mathematical function, supplied
> with all needed numbers,
> and returns its integral. I want to do this for a list of numbers. Is
> there either some
> built in function that would do this or some module that would contain
> such a function?
>
> Thanks,
> Kyle
------------------------------
Date: 14 Dec 2000 19:31:53 GMT
From: atspragg@garbanzo.engr.ucdavis.edu (Adam Spragg)
Subject: Re: My first JAPH....
Message-Id: <91b779$ijk$1@mark.ucdavis.edu>
Lou Moran (lmoran@wtsg.com) wrote:
: And no I have no idea how to make it do that. <sheepish grin>
: >@_=(join"","0",eval join("*",17,435983),eval join("*",ord" ",ord"H",5,4441),
: >eval join("*",(ord"d")+(ord"/"),461,1433),eval(join"*",7,ord"/",3529),"0",eval
: >(join"*",ord"0",23209),0,eval(join"*",3,17,157061),eval(join"*",179,229499),
: >"0409".7099,eval(join'*',2,5689,9413))=~m%.{0,3}%g;for(@_){print chr;}print"\n";
Just for educational purposes for anyone who might be interested, here's
how I got from "Just another Perl Hacker" (no comma), to that mess above.
The first thing I did was write a program that would output of the
desired string as integer numbers (via your handy ASCII chart). The Perl
'ord' function was very helpful with this.
I came up with this:
074117115116032097110111116104101114032080101114108032104097099107101114
I then took that number, and split it up into integers of length 8 or so.
07411711
51160320
etc...
For each one of those numbers, I found (using a program called 'factor'
that may be part of some Unix distributions), the prime factorization of
each of those numbers.
For instance, for 07411711, I found that this is factored into two
primes, 17 and 435983.
So, if you take 17 and multiply it by 435983, you get 7411711, which also
happens to be the ASCII code for "J", "u", and part of "s".
The repetitive theme here is this statement:
eval(join"*",3,17,157061)
What this does is take the values 3, 17, 157061, and make a string by
joining them together with the * sign, so you get:
eval 3*17*157061
Evaluating this string gets you a bunch of ASCII values as I listed above.
Sometimes, I got tricky:
eval join("*",ord" ",ord"H",5,4441)
The ASCII value for a space (' '), is 32, and "H" is 72. It turns out
this bit of code used to be:
eval join ("*", 2,2,2,2,2,2,2,2,3,3,5,4441)
I grouped this as 32,72,5,4441, and substitued 32 with ord" " and 72 with
ord"H".
So... all these evals are done under one big ' join"" ' statement to get
a single value, and this value is split up into a list where each element
is 3 digits long (I had to look up in the FAQ about how to do this. Note
that the FAQ has MANY answers to common questions! Use it!) by doing this:
=~m%.{0,3}%g
Each of these triples is stored in @_. Finally, the character is printed
for each 3 digit ASCII value:
for(@_){print chr;}
Also note that I had to throw some "0"s in by hand so that "J" (ASCII 72)
would be represented as 072 and not mess things up.
That was my train of though, at least. Hope that proved helpful to
someone out there.
Adam
------------------------------
Date: Thu, 14 Dec 2000 19:27:55 GMT
From: rzilavec@tcn.net (Richard Zilavec)
Subject: Re: My first JAPH....
Message-Id: <3a3a1f17.177493631@news.tcn.net>
On 14 Dec 2000 19:31:53 GMT, atspragg@garbanzo.engr.ucdavis.edu (Adam
Spragg) wrote:
>Lou Moran (lmoran@wtsg.com) wrote:
>: And no I have no idea how to make it do that. <sheepish grin>
>
>: >@_=(join"","0",eval join("*",17,435983),eval join("*",ord" ",ord"H",5,4441),
>: >eval join("*",(ord"d")+(ord"/"),461,1433),eval(join"*",7,ord"/",3529),"0",eval
>: >(join"*",ord"0",23209),0,eval(join"*",3,17,157061),eval(join"*",179,229499),
>: >"0409".7099,eval(join'*',2,5689,9413))=~m%.{0,3}%g;for(@_){print chr;}print"\n";
>
>Just for educational purposes for anyone who might be interested, here's
>how I got from "Just another Perl Hacker" (no comma), to that mess above.
Very cool, I do have to try this one day...
--
Richard Zilavec
rzilavec@tcn.net
------------------------------
Date: Thu, 14 Dec 2000 13:19:22 -0600
From: beetle <replytousenet@usenet.com>
Subject: need https version of lwp-download
Message-Id: <f67i3tctrsg0se3vb9kmvrp67fo9ojp648@4ax.com>
anyone know of a https version of lwp-download? Need to connect to
a secure server and download a page.
thanks
------------------------------
Date: Thu, 14 Dec 2000 11:32:20 -0800
From: Michael Budash <mbudash@sonic.net>
Subject: Re: need https version of lwp-download
Message-Id: <mbudash-ABDF2E.11322014122000@news.pacbell.net>
In article <f67i3tctrsg0se3vb9kmvrp67fo9ojp648@4ax.com>, beetle
<replytousenet@usenet.com> wrote:
>
> anyone know of a https version of lwp-download? Need to connect to
> a secure server and download a page.
>
> thanks
per the README.SSL file included with the lib-www distribution:
> SSL SUPPORT
> -----------
>
> The libwww-perl package has support for using SSL/TLSv1 with its HTTP
> client and server classes. This support makes it possible to access
> https schemed URLs with LWP. Because of the problematic status of
> encryption software in general and certain encryption algorithms in
> particular, in several countries, libwww-perl package doesn't include
> SSL functionality out-of-the-box.
>
> Encryption support is obtained through the use of Crypt::SSLeay or
> IO::Socket::SSL, which can both be found from CPAN. At present, the
> easiest and recommended module to use is Crypt::SSLeay. Crypt::SSLeay
> provides "plug-and-play" SSL support for LWP while IO::Socket::SSL
> requires patching LWP. In addition to bringing SSL support to the LWP
> package, IO::Socket::SSL can be used as an object oriented interface
> to SSL encrypted network sockets.
>
> There is yet another SSL interface for perl called Net::SSLeay. It has
> a more complete SSL interface and can be used for web client
> programming among other things but doesn't directly support LWP.
>
> The underlying SSL support in all of these modules is based on OpenSSL
> <http://www.openssl.org/> (formerly SSLeay). For WWW-server side SSL
> support (e.g. CGI/FCGI scripts) in Apache see <http://www.modssl.org/>.
the short story: install Crypt::SSLeay and all its associated modules
and you're good to go...
hth-
--
Michael Budash ~~~~~~~~~~ mbudash@sonic.net
------------------------------
Date: 14 Dec 2000 19:40:42 +0000
From: nobull@mail.com
Subject: Re: need https version of lwp-download
Message-Id: <u98zpi6bb9.fsf@wcl-l.bham.ac.uk>
beetle <replytousenet@usenet.com> writes:
> anyone know of a https version of lwp-download?
lwp-download
(LWP supports HTTPS but you need to have IO::Socket::SSL installed to
use it)
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Thu, 14 Dec 2000 14:14:22 -0800
From: Michael Budash <mbudash@sonic.net>
Subject: Re: need https version of lwp-download
Message-Id: <mbudash-2BE455.14142214122000@news.pacbell.net>
In article <u98zpi6bb9.fsf@wcl-l.bham.ac.uk>, nobull@mail.com wrote:
> beetle <replytousenet@usenet.com> writes:
>
> > anyone know of a https version of lwp-download?
>
> lwp-download
>
> (LWP supports HTTPS but you need to have IO::Socket::SSL installed to
> use it)
or Crypt::SSLeay... per the README.SSL that comes with the libwww
distro...
--
Michael Budash ~~~~~~~~~~ mbudash@sonic.net
------------------------------
Date: Thu, 14 Dec 2000 19:27:29 GMT
From: bentmon@my-deja.com
Subject: Numbers to strings
Message-Id: <91b6up$99b$1@nnrp1.deja.com>
I'm sure this is an exceedingly stupid question.
But I've looked all over the place and can't find
a function that will turn a number into string. I
guess I just don't know what to look for... Any
Ideas?
Tom Welch
Atlanta, GA
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Thu, 14 Dec 2000 19:28:53 GMT
From: bentman <bentmon@my-deja.com>
Subject: numbers to strings
Message-Id: <91b71c$9ac$1@nnrp1.deja.com>
what function would I use to convert a number to a string?
Thanks
Tom
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: 14 Dec 2000 12:44:53 -0700
From: tchrist@perl.com (Tom Christiansen)
Subject: Re: Numbers to strings
Message-Id: <3a392335$1@cs.colorado.edu>
In article <91b6up$99b$1@nnrp1.deja.com>, <bentmon@my-deja.com> wrote:
>I'm sure this is an exceedingly stupid question.
>But I've looked all over the place and can't find
>a function that will turn a number into string. I
>guess I just don't know what to look for... Any
>Ideas?
What is the sound of one hand clapping?
--tom
------------------------------
Date: Thu, 14 Dec 2000 11:54:25 -0800
From: Michael Budash <mbudash@sonic.net>
Subject: Re: numbers to strings
Message-Id: <mbudash-9FCA00.11542514122000@news.pacbell.net>
In article <91b71c$9ac$1@nnrp1.deja.com>, bentman <bentmon@my-deja.com>
wrote:
> what function would I use to convert a number to a string?
>
in most cases, it's implicitly done.
what is it you're trying to do?
--
Michael Budash ~~~~~~~~~~ mbudash@sonic.net
------------------------------
Date: Thu, 14 Dec 2000 14:58:23 -0500
From: "Joel Ricker" <joejava@dragonat.net>
Subject: Re: Numbers to strings
Message-Id: <VJ9_5.71$ys.5106@news4.atl>
Tom Christiansen wrote in message <3a392335$1@cs.colorado.edu>...
>In article <91b6up$99b$1@nnrp1.deja.com>, <bentmon@my-deja.com> wrote:
>>I'm sure this is an exceedingly stupid question.
>>But I've looked all over the place and can't find
>>a function that will turn a number into string. I
>>guess I just don't know what to look for... Any
>>Ideas?
>
>What is the sound of one hand clapping?
>
>--tom
The short answer is there isn't. Perl uses one data type for strings and
numbers and decides which is which by use context. The full explanation is
available in most any perl book like Learning Perl from O'Reilly... partly
written by the gentleman above (tom, that would be silent applause). Also
I'm sure there are plenty of basic tutorials on getting started with Perl.
Check out the perl faq at www.perl.com or www.cpan.org, or maybe
www.perlfaq.com may have a little on it.
Joel
------------------------------
Date: Thu, 14 Dec 2000 20:34:04 GMT
From: Brendon Caligari <bcaligari@my-deja.com>
Subject: Re: numbers to strings
Message-Id: <91bart$cmu$1@nnrp1.deja.com>
just use the variable as you wish...it will (usually) behave as you
expect it depending whether you are evaluating your 'something' in a
string or numeric expression.
In fact, perl has different relational operators for string (eq, ne,
cmp gt, ge, lt, le) or numeric (==, !=, <=>, >, >=, <, <=) expressions.
Besides arithmetic operators, some really cute string operators like
concatenation (.) and repetition (x) are also provided.
try this:
my $thing = '10';
print "as a number: ", $thing * 2, " or as a string: ", $thing x 2;
B
In article <91b71c$9ac$1@nnrp1.deja.com>,
bentman <bentmon@my-deja.com> wrote:
> what function would I use to convert a number to a string?
>
> Thanks
> Tom
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: 14 Dec 2000 13:40:17 -0700
From: tchrist@perl.com (Tom Christiansen)
Subject: Re: numbers to strings
Message-Id: <3a393031@cs.colorado.edu>
In article <91b71c$9ac$1@nnrp1.deja.com>, bentman <bentmon@my-deja.com> wrote:
>what function would I use to convert a number to a string?
Consider...
What function would convert a string into a filename?
What function would convert a number into an argument?
What function would convert a filename into a home directory?
What function would convert a number into a Boolean?
What function would convert a reference into a number?
What function would convert a scalar into a string?
What function would convert a number into a float?
What function would convert a hash into a structure?
Or:
How would you convert a hammer into a tool?
How would you convert a hammer into a weapon?
How would you convert a hammer into artwork?
How would you convert a hammer into rubbish?
How would you convert a hammer into a doorstop?
The fundamental problem with virtually all such "How do I convert..."
questions, in Perl, is that there is a profound misapprehension as
to what something *IS*. To even begin to ask a question about
strings and numbers is part of this fundamental conceptual failure.
mkdir(time * 2, reverse 3**1 . 3**2 . 2**2);
It's !what you qq(have)--you *have* a scalar datum. It's what
you're **doing** that counts++.
--tom
------------------------------
Date: Thu, 14 Dec 2000 20:04:56 -0000
From: David Lee <dwl@slip.net>
Subject: perl5.6.1 for win32
Message-Id: <t3i9v8olf7hb0f@corp.supernews.com>
Hi,
Can someone please tell me where I can get perl 5.6.1
for windows? I need to be able to use the
utf8 discipline with binmode
Thanks
David
------------------------------
Date: Thu, 14 Dec 2000 14:46:41 -0600
From: Cameron Dorey <camerond@mail.uca.edu>
Subject: Re: perl5.6.1 for win32
Message-Id: <3A3931B1.EAA07CAF@mail.uca.edu>
David Lee wrote:
>
> Hi,
>
> Can someone please tell me where I can get perl 5.6.1
> for windows? I need to be able to use the
> utf8 discipline with binmode
If and/or when there might be a 5.6.1 version, you should be able to get
it from www.activestate.com.
Cameron
--
Cameron Dorey
Associate Professor of Chemistry
University of Central Arkansas
Phone: 501-450-5938
camerond@mail.uca.edu
------------------------------
Date: 14 Dec 2000 22:34:58 GMT
From: evanda@ater.org (Evanda Remington)
Subject: pipes and file i/o
Message-Id: <slrn93iioh.7d1.evanda@mist.ater.org>
Is it possible to send info to a child process via a pipe and have the
child then write it to file? It seems like a perfectly legitimate
thing to do.
Anyone have any idea why i'm getting errors? I'd post code but it's
quite messy at the moment.
generally:
pipe INPARENT, OUTCHILD or die "Pipe err(1): $!\n";
pipe INCHILD, OUTPARENT or die "Pipe err(2): $!\n";
open (FILE, ">/home/evanda/bok") or die "No file! $!\n";
.
.
.
open(STDERR, ">&OUTCHILD") or die "Open Error(1): $!\n";
open(DEVTTY, "<&INCHILD") or die "Open Error(2): $!\n";
...
basically i want what is sent to the child sent to the file.
is this a bad way to do it?
-e
--
Evanda Remington
evanda@ater.org
http://www.ater.org
------------------------------
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 5115
**************************************