[10819] in Perl-Users-Digest
Perl-Users Digest, Issue: 4420 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Dec 14 13:07:55 1998
Date: Mon, 14 Dec 98 10:00:23 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 14 Dec 1998 Volume: 8 Number: 4420
Today's topics:
Re: *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Pos <dgris@moiraine.dimensional.com>
Re: *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Pos <ajohnson@gatewest.net>
Re: a simple puzzle (I suspect) (Mika Laari)
Re: ARGV <uri@sysarch.com>
Re: Bug (array ref in a "void" context) (Mark-Jason Dominus)
Re: Bug (array ref in a "void" context) <r28629@email.sps.mot.com>
Re: convert file contents to uppercse <r28629@email.sps.mot.com>
diagnostics (Jim Mooney)
Re: Flock <r28629@email.sps.mot.com>
Re: Get an Html page from another server <newsposter@cthulhu.demon.nl>
Re: Get an Html page from another server dave@mag-sol.com
Re: Installing Perl5.004 Solaris 2.6 <msmith@stokecoll.ac.uk>
Re: localtime () - perl's bug ? <jeromeo@atrieva.com>
passing multiple keyed arrays to a subroutine (Mark Guz)
Re: passing multiple keyed arrays to a subroutine (Mark Guz)
Re: Perl multithread/multiprocess socket server example <patrick.mulvany@no.spam.torrington.net>
Re: Perl multithread/multiprocess socket server example <patrick.mulvany@no.spam.torrington.net>
Perl2EXE <cb2001@hotmail.com>
Re: Programming Prob dave@mag-sol.com
Re: renaming an array with a number at the end <stuart@dune-concept.com>
Re: renaming an array with a number at the end dave@mag-sol.com
Script to Convert Text to HTML <sugar@HWS.EDU>
security in perl? (or other) (Stefano Ghirlanda)
Re: send e-mail by port 25 in Perl !!! HELPME !!!!! <gellyfish@btinternet.com>
Re: sorting hashes ptimmins@netserv.unmc.edu
Re: sorting hashes dave@mag-sol.com
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 14 Dec 1998 10:28:53 -0700
From: Daniel Grisinger <dgris@moiraine.dimensional.com>
Subject: Re: *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Posted Twice Weekly ***
Message-Id: <m3iufeljje.fsf@moiraine.dimensional.com>
mgjv@comdyn.com.au (Martien Verbruggen) writes:
> The few CPAN mirrors I just tried mention that 5.005_02 is the latest,
> and the stable release. 5.004_05 doesn't even get a mention, and is
> not available in the src/5.0 directory.
5.004_05 is currently in testing and should be showing up in final
form Real Soon Now[tm]. You can find the trial versions of it in Tim
Bunce's CPAN directory.
I believe that 5.005_03 will also be showing up soon, but don't
remember if a trial version of that has been released yet.
dgris
--
Daniel Grisinger dgris@moiraine.dimensional.com
perl -Mre=eval -e'$_=shift;;@[=split//;;$,=qq;\n;;;print
m;(.{$-}(?{$-++}));,q;;while$-<=@[;;' 'Just Another Perl Hacker'
------------------------------
Date: Mon, 14 Dec 1998 11:46:54 -0600
From: Andrew Johnson <ajohnson@gatewest.net>
Subject: Re: *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Posted Twice Weekly ***
Message-Id: <36754F0E.10E4C4D3@gatewest.net>
Daniel Grisinger wrote:
!
! mgjv@comdyn.com.au (Martien Verbruggen) writes:
!
! > The few CPAN mirrors I just tried mention that 5.005_02 is the latest,
! > and the stable release. 5.004_05 doesn't even get a mention, and is
! > not available in the src/5.0 directory.
!
! 5.004_05 is currently in testing and should be showing up in final
! form Real Soon Now[tm]. You can find the trial versions of it in Tim
! Bunce's CPAN directory.
!
! I believe that 5.005_03 will also be showing up soon, but don't
! remember if a trial version of that has been released yet.
note also, maintenance versions (including trial maint. releases) are
available in the 'src/5.0/maint/' directory --- on the mirror I use
there are currently trial versions including 5.004_05-MAINT-TRIAL-7
and 5.005_03-MAINT-TRIAL-1 (among others).
regards
andrew
------------------------------
Date: 14 Dec 1998 16:25:21 GMT
From: mlaari@kuha.cc.lut.fi (Mika Laari)
Subject: Re: a simple puzzle (I suspect)
Message-Id: <slrn77aevh.94e.mlaari@kuha.cc.lut.fi>
Thomas Turn Jensen <Mukke@get2net.dk> wrote:
>Could you explain that *? to me? if so, I'd be very happy :)
In regular expressions a quantifier followed by '?' makes it
act non-greedy. That is, it matches the shortest string in
can. This feature was introduced in perl 5 I think.
--
- Mika Laari -
------------------------------
Date: 14 Dec 1998 11:47:40 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: ARGV
Message-Id: <x7emq2smab.fsf@sysarch.com>
>>>>> "BL" == Bart Lateur <bart.lateur@skynet.be> writes:
BL> Uri Guttman wrote:
BL> #!/usr/local/bin/perl
BL> print "Content-type: text/plain\n\n";
BL> $" = '|';
BL> print "Data line: @ARGV\n";
BL> htpp://.../test.cgi?Be+prepared+to+be+amazed!
BL> Data line: Be|prepared|to|be|amazed!
that has to be a server thing. it is the one that forks and execs (which
sets argv) the cgi program. it is not in the cgi spec so it can't be
relied upon. why is it splitting on + beforehand? that would break many
cgi input parsers.
and further, there ARE limits to ARGV length (i just didn't want to tell
that to the original poster as it was not relevent to perl) which are
documented in exec. and there are limits to query length (server
dependent) which is why it is better to use post which send data
to stdin and has no limit on length.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire ---------------------- Perl, Internet, UNIX Consulting
uri@sysarch.com ------------------------------------ http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: 14 Dec 1998 11:01:59 -0500
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Bug (array ref in a "void" context)
Message-Id: <753cpn$tk$1@monet.op.net>
In article <36761668.22705171@news.skynet.be>,
Bart Lateur <bart.lateur@skynet.be> wrote:
>Argh! It turns out that the comma operator has a lower precedence than
>the assignment. What a strange world.
That's not strange. Comma has lower precedence than almost
everything, because otherwise things like this
for ($i=0, $j=1;
$i<$N;
$i++, $j*=2) {
print $i => $j\n";
}
and this
$nfound = select($rout=$rin, $wout=$win, $eout=$ein, undef);
would not work.
Indeed, the whole point of the comma operator is that it has very low
precedence.
------------------------------
Date: Mon, 14 Dec 1998 10:47:40 -0600
From: Tk Soh <r28629@email.sps.mot.com>
To: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Bug (array ref in a "void" context)
Message-Id: <3675412C.2A137AC2@email.sps.mot.com>
[posted to c.l.p.m and copy emailed]
Bart Lateur wrote:
>
> Bart Lateur wrote:
>
> > $aryref ||= $updated++,[1,2,3];
>
> >> Useless use of scalar ref constructor in void context at voidref.t line 2.
>
> Argh! It turns out that the comma operator has a lower precedence than
> the assignment. What a strange world.
>
> Bart.
anyway, what are you trying to do in that line?
-TK
------------------------------
Date: Mon, 14 Dec 1998 10:37:42 -0600
From: Tk Soh <r28629@email.sps.mot.com>
To: Chris <chris@nospam.com>
Subject: Re: convert file contents to uppercse
Message-Id: <36753ED6.DCA3B8AB@email.sps.mot.com>
[posted to c.l.p.m and copy emailed]
Chris wrote:
>
> Request for a bit of code that converts a files contents to uppercase
>
> cheers
perl -ne 'print uc' anycase.txt
-TK
------------------------------
Date: Mon, 14 Dec 1998 17:18:30 GMT
From: gemhound@gemhound.com (Jim Mooney)
Subject: diagnostics
Message-Id: <367547e9.11485780@news.primeline.com>
My apologies if this is a dupe, but I sent it via dejanews and it
doesn't seem to have arrived.
I am using use diagnostics; but the longer error output scrolls by
on my DOS screen (using Activestate win32 Perl). I tried redirecting
the output, ie, perl myprog.pl > diags , but that doesn't work
either. How can I keep these longer diagnostic messages from
scrolling by so I only see the bottom part?
------------------------------
Date: Mon, 14 Dec 1998 11:00:29 -0600
From: Tk Soh <r28629@email.sps.mot.com>
To: Mike <support@counter.w-dt.com>
Subject: Re: Flock
Message-Id: <3675442D.7375841@email.sps.mot.com>
[posted to c.l.p.m and copy emailed]
Mike wrote:
>
> I looked at many docs, somepeople would say if you don't want to help, without
> being snobbish, get the hell off the news group. A news group is where people
> go for help. I looked up in many perl books, just because it has flock
> (filehandle, 2); to me doesn't just come out and say it has to go after open.
>
> Tad McClellan wrote:
>
> > Mike (support@counter.w-dt.com) wrote:
> >
> > : Why do you call flock after you open the file and not before?
> >
> > I think if you look up flock() in perlfunc it should be apparent:
> >
> > =item flock FILEHANDLE,OPERATION
> >
> > You must supply a filehandle as the first argument, so you
> > have to _get_ a filehandle first.
> >
> > You really need to look at the docs for 10-15 seconds before posting...
> >
> > --
> > Tad McClellan SGML Consulting
> > tadmc@metronet.com Perl programming
> > Fort Worth, Texas
He has helpped, and simply as a favour. If you can't appreciate it, you
need to make a decision if you are to continue with this ng.
Now, tell me how you get the filehandler with openning a file.
-TK
------------------------------
Date: Mon, 14 Dec 1998 11:23:59 -0500
From: Erik van Roode <newsposter@cthulhu.demon.nl>
Subject: Re: Get an Html page from another server
Message-Id: <36753B9D.39512E81@cthulhu.demon.nl>
Thomas Cunningham wrote:
>
> I R A Aggie <fl_aggie@thepentagon.com> writes:
>
> : perldoc LWP contains the information you seek.
>
> : James
>
> Is there an easy way to do this without the LWP module?
See thread with subject:
'how can script get file http://...'
(and perhaps some of the other half dozen threads about downloading html.
Erik
------------------------------
Date: Mon, 14 Dec 1998 16:45:45 GMT
From: dave@mag-sol.com
To: dd@internet-consultants.com
Subject: Re: Get an Html page from another server
Message-Id: <753fbp$674$1@nnrp1.dejanews.com>
[email cc of usenet article send to cited author]
In article <36752206.94E9383F@internet-consultants.com>,
Daniel Droetto <dd@internet-consultants.com> wrote:
> Hi
> My question seems very simple.
> I want to get an html page from the web (store on a server different
> from which I run my script), and put it on a $variable.
>
> Any idea.
> Thanks from a beginner.
Get the libwww bundle from CPAN <http://www.perl.com/CPAN/>, your problem then
becomes trivial.
> Please answer directly to my email : droetto@intershop.fr
This is generally considered rude. If you post here, you should take the
effort to read the replies here.
Dave...
--
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 14 Dec 1998 13:26:29 +0000
From: Mick Smith <msmith@stokecoll.ac.uk>
Subject: Re: Installing Perl5.004 Solaris 2.6
Message-Id: <36751204.1A01011D@stokecoll.ac.uk>
Thanks for your reply.
It is more than possible that of Web developer does not how how to setup Perl - How can I test
the installation myself?
brian d foy wrote:
> In article <366E625E.3D08F2D8@stokecoll.ac.uk>, Mick Smith <msmith@stokecoll.ac.uk> posted:
>
> > I have recently downloaded and installed Perl 5.004 for Solaris 2.6
> > (Sparc) from www.sunfreeware.com - a site that provides pre-compiled
> > software for Solaris platforms.
>
> > It was installed using the pkgadd function into the default directory
> > /usr/local/bin.
>
> i've done this once with that particular package and did not have
> problems, but that was only until i could get gcc working and compile
> the latest perl source.
>
> > There were no error messages and everything seemed OK, although our web
> > developer informs me that Perl is not working on our system.
>
> are you sure the web developer isn't what is hte problem? what
> does he mean by "does not work"?
>
> --
> brian d foy <brianNOSPAM@NOSPAM.smithrenaud.com>
> CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
> remove NOSPAM or don't. it doesn't matter either way.
------------------------------
Date: Mon, 14 Dec 1998 09:10:58 -0800
From: Jerome O'Neil <jeromeo@atrieva.com>
To: r j huntington <wolph@merlin.albany.net>
Subject: Re: localtime () - perl's bug ?
Message-Id: <367546A2.3630B420@atrieva.com>
r j huntington wrote:
> You must be very young (no blame, of course). Let me assure you that
> the above is quite true. Almost no one had megabytes to work with then.
> Memory and CPU time were VERY VERY EXPENSIVE. Code was deliberately
> tight as could be made to conserve those precious resources. That's
> why we have a Y2K problem now. No one could afford the extra two bytes
> then. Memory was a good 1,000 times more expensive - not even adjusted
> for infaltion, which makes the ratio even more extreme. Take it from
> one who was there.
Now that takes me back. I used to maintain an extended core memory unit
(ECMU) about the size of a refrigerator that gave us an additional 64K
of memory over the 32K that was installed on the computers, which were
about the size of two refrigerators.
We had it good back then.
--
Jerome O'Neil, Operations and Information Services
Atrieva Corporation, 600 University St., Ste. 911, Seattle, WA 98101
jeromeo@atrieva.com - Voice:206/749-2947
The Atrieva Service: Safe and Easy Online Backup http://www.atrieva.com
------------------------------
Date: Mon, 14 Dec 1998 16:38:50 GMT
From: mguz@sol.co.uk (Mark Guz)
Subject: passing multiple keyed arrays to a subroutine
Message-Id: <36753e86.439621972@news.scotland.net>
I am trying to pass multiple keyed arrays to a subroutine, and i cant
seem to see how to do it.
Niavely i thought
check(%array1,%array2);
sub check{
(%inarray1,%inarray2) = @_;
would do it, but it didnt.
I am probably being an idiot but is this possible?
Mark Guz
My views are my own and not those of my employer
Scotland On Line
------------------------------
Date: Mon, 14 Dec 1998 17:09:04 GMT
From: mguz@sol.co.uk (Mark Guz)
Subject: Re: passing multiple keyed arrays to a subroutine
Message-Id: <36754614.441555503@news.scotland.net>
fear not, a trawl of dejanews revealed the answer
Cheers
Mark Guz
My views are my own and not those of my employer
Scotland On Line
------------------------------
Date: Mon, 14 Dec 1998 17:05:05 +0000
From: Patrick Mulvany <patrick.mulvany@no.spam.torrington.net>
Subject: Re: Perl multithread/multiprocess socket server example?
Message-Id: <36754540.D7F1E4B8@no.spam.torrington.net>
Possible use of Win32::Process module which allows you to Wait on compleation of a Process with a time
out (used this to kill zombie OLE children).
Thread.pm has some nice bits for multithreading and also Win32::Semaphore and Win32::Mutex can be useful
if you require resource locking.
Don't know if this will help
Paddy
Kyle Cordes wrote:
> In article <74ukqk$1fj$1@gellyfish.btinternet.com>, Jonathan Stowe <gellyfish@btinternet.com> wrote:
>
> >> I'm looking to build a rather simple server application in Perl. The tricky
> >> part is that I want it to be a multitasking/threading/whatever server, so
> >> that each incoming connection spawns another process to handle the request,
> >> so more than one can be processes concurrently.
>
> >There is an example of a server in the perlipc manpage that uses fork() to
> >create a new process for each connection. Of course if you are on Win32
> >then you may not be able to use fork() - threading is still considered an
> >experimental feature of Perl so you might not want to use that. On Win32
> >you might be able to use Win32::CreateProcess (or something like that) but
> >I dont know a great deal about that stuff ...
>
> Thanks for the pointer. That example will serve the basic purpose.
> Unfortunately, it mentions but does not implement some important features,
> such as watching for "zombie" child processes and killing them after a while.
> If someone knows of a more complete (production-grade) socket server template,
> it would be nice, but if not, the man page is a starting point...
>
> [* kyle@kylecordes.com | For Delphi | BDE Alternatives Guide *]
> [* http://www.kylecordes.com | developers: | MIDAS Alternatives Guide *]
------------------------------
Date: Mon, 14 Dec 1998 17:07:46 +0000
From: Patrick Mulvany <patrick.mulvany@no.spam.torrington.net>
Subject: Re: Perl multithread/multiprocess socket server example?
Message-Id: <367545E1.4929D62@no.spam.torrington.net>
PS. Oh yes and if you get it working on Win32 could you let me know how.. I am about to start writing a chat
server on NT using Perl.
Thanks
Paddy
Patrick Mulvany wrote:
> Possible use of Win32::Process module which allows you to Wait on compleation of a Process with a time
> out (used this to kill zombie OLE children).
> Thread.pm has some nice bits for multithreading and also Win32::Semaphore and Win32::Mutex can be useful
> if you require resource locking.
>
> Don't know if this will help
>
> Paddy
>
> Kyle Cordes wrote:
>
> > In article <74ukqk$1fj$1@gellyfish.btinternet.com>, Jonathan Stowe <gellyfish@btinternet.com> wrote:
> >
> > >> I'm looking to build a rather simple server application in Perl. The tricky
> > >> part is that I want it to be a multitasking/threading/whatever server, so
> > >> that each incoming connection spawns another process to handle the request,
> > >> so more than one can be processes concurrently.
> >
> > >There is an example of a server in the perlipc manpage that uses fork() to
> > >create a new process for each connection. Of course if you are on Win32
> > >then you may not be able to use fork() - threading is still considered an
> > >experimental feature of Perl so you might not want to use that. On Win32
> > >you might be able to use Win32::CreateProcess (or something like that) but
> > >I dont know a great deal about that stuff ...
> >
> > Thanks for the pointer. That example will serve the basic purpose.
> > Unfortunately, it mentions but does not implement some important features,
> > such as watching for "zombie" child processes and killing them after a while.
> > If someone knows of a more complete (production-grade) socket server template,
> > it would be nice, but if not, the man page is a starting point...
> >
> > [* kyle@kylecordes.com | For Delphi | BDE Alternatives Guide *]
> > [* http://www.kylecordes.com | developers: | MIDAS Alternatives Guide *]
------------------------------
Date: Mon, 14 Dec 1998 18:50:06 +0100
From: "Christian" <cb2001@hotmail.com>
Subject: Perl2EXE
Message-Id: <36754db8.0@info.xpoint.at>
Hi everybody!
Fast HELP wanted!
Does someone have the fullversion of PERL2EXE? or can someone tell me where
to download the fullversion (not the shareware trial!)
i need this very much, cuz i have to write a perl script for school, but i
don't want them to get the source, it was too much work!
so please send it to me (cb2001@hotmail.com) or let me know where i can
download it!
tnx in advance
miGhtY
------------------------------
Date: Mon, 14 Dec 1998 16:39:18 GMT
From: dave@mag-sol.com
Subject: Re: Programming Prob
Message-Id: <753evm$5n8$1@nnrp1.dejanews.com>
In article <3674DFA0.47F498D6@slip.net>,
Eric Umehara <momiji@slip.net> wrote:
> If you have a form which is accessed a lot and one person submits it,
> the script opens a file to input the data whiile at the same time
> another person submits the same form that would require the same output
> file what would happen. Would each sumbit have to wait in line for the
> one prebious to it to go or can Perl/CGI scrits run simoltaniously?
That's why you always use flock when writing this kind of code.
Dave...
--
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 14 Dec 1998 17:28:53 +0100
From: "Stuart Thorn" <stuart@dune-concept.com>
Subject: Re: renaming an array with a number at the end
Message-Id: <753eg3$1iv2$1@buggy.easynet.fr>
Hi,
As a general rule 'foreach' is simpler but using 'while' and an index gives
you more visibility when you're going backwards and forwards in the array.
My suggestion, looking at your code, is that you'd get a performance gain
using more references. It makes you're code less readable to beginners but
tidier and quicker when you're passing large arrays around.
An example would be (although probably not doing exactly what you're
wanting):
my $words = ["one", "two", "three"];
my $motifs = ["o", "th", "perl"];
my $otherArray = [];
my $count = 0;
foreach $motif ( @{ $motifs } ) {
$otherArray->[$count++] = [grep( m/$motif/, @{ $words } )];
}
Stuart.
_________
>
>How does this:
>------------------------------
>$z = 0;
>$d = 0;
>foreach (@finalword)
> {
> @{$d+1} = grep(/$finalword[$z]/,@{$d});
> $z++;
> $d++;
> }
>------------------------------
>differ from this:
>------------------------------
>$z = 0;
>$d = 0;
>$count = 5;
>while ($z < $count)
> {
> @{$d+1} = grep(/$finalword[$z]/,@{$d});
> $z++;
> $d++;
> }
>------------------------------
>
>They seem to give the same results but are there any considerations to
>take into, any pitfalls? Which is more efficient?
>
>Thanks.
>
>Jason Q.
------------------------------
Date: Mon, 14 Dec 1998 16:53:23 GMT
From: dave@mag-sol.com
Subject: Re: renaming an array with a number at the end
Message-Id: <753fq2$6kc$1@nnrp1.dejanews.com>
In article <3674e353.28105082@news.cyberway.com.sg>,
pigs_can_fly@mindless.com (Jason Q.) wrote:
> I have this seemingly simple task but am new to Perl so if any one
> would help...
>
> Within a while loop, I need to rename an array each time it goes
> through the loop. @array0 changes to @array1 changes to @array2...
You almost *never* really need to do this. Have you considered using an array
of arrays. Something like this...
my @arr;
my $y;
while (some condition)
{
$arr[$y++] = ();
}
You can then refer to the individual arrays as:
@{$arr[0]), @{$arr[1]}, etc.
and the individual elements of the arrays as:
$arr[0]->[0], $arr[0]->[1],
$arr[1]->[0], $arr[1]->[1],
etc...
> this is what I have but my syntax at @array[$y] is wrong. How should I
> 'phrase' it?
>
> *********************
>
> $y = 0;
>
> while (a certain condition)
> {
> @array[$y];
> $y++;
> }
>
> ********************
hth,
Dave...
--
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 14 Dec 1998 11:44:36 EDT
From: <sugar@HWS.EDU>
Subject: Script to Convert Text to HTML
Message-Id: <Pine.PMDF.3.95.981214113945.908290A-100000@HWS.EDU>
I would like to know if anyone could help with a script that could take
the following and convert it to html:
Monday|Tuesday|Wednesday..
MDLN|61|35|NW|5|01|70|32|N|12|01
What I would like is for a a script to read a file which has text as
above and create a table sort of like the following:
City HI Low Windspeed/Direction Sky conditions or something like that for
each of the days and convert the MDLN to a city name and the 01 to a
specified image file.
David Sugar <sugar@hws.edu>
Phone: 315-787-6525
Mailing Address: David Sugar
Hobart and William Smith Colleges
3769 Scandling Center
Geneva, New York 14456
------------------------------
Date: 14 Dec 1998 16:52:03 GMT
From: stefano@rerumnatura.zool.su.se (Stefano Ghirlanda)
Subject: security in perl? (or other)
Message-Id: <slrn77agj1.j61.stefano@rerumnatura.zool.su.se>
Hi,
I was trying to install tripwire-1.2. It does not seem straightforward to
compile (at least to me). Since I get errors, and since tripwire is no
longer a freely available product (the version 1.3 isn't, that it, and the
old ones are unsupported, it seems), I was looking for an equivalent
integrity-check program written, e.g., in perl or other...
any ideas?
thanks,
Stefano
--
Stefano Ghirlanda, Zoologiska Institutionen, Stockholms Universitet
Office: D554, Arrheniusv. 14, S-106 91 Stockholm, Sweden
Phone: +46 8 164055, Fax: +46 8 167715, Email: stefano@zool.su.se
Support Free Science, look at: http://rerumnatura.zool.su.se
------------------------------
Date: 13 Dec 1998 13:06:09 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: send e-mail by port 25 in Perl !!! HELPME !!!!!
Message-Id: <750e41$276$1@gellyfish.btinternet.com>
On Sun, 13 Dec 1998 05:11:43 GMT BondMac@hotmail.com wrote:
> HI, help me please whith one script in perl what send one mail by port 25 by
> the server SMTP is other machine (Sun1), where run the script is other Sun2
> !!! Iam have perl 5.001m !! please helpme ... Urls ????????
>
I think you really want to be upgrading your Perl to something more recent
I mean it is a 5.00502 for the stable realease now and a lot of bug
fixes have gone under the bridge since the release you have.
To do SMTP stuff your best bet is to use the Net::SMTP module available from
CPAN <URL:http://www.perl.com/CPAN> - I cannot guarantee that it will work
with the version of Perl that you have (a good reason to upgrade).
If you are looking for a more generalized mailing solution you may want to
be looking at the Mail::* modules as described in perlfaq9 (as I am not
sure whether the Perl distribution you have would have had perlfaq9 then
this can also be found via www.perl.com).
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Mon, 14 Dec 1998 16:27:52 GMT
From: ptimmins@netserv.unmc.edu
Subject: Re: sorting hashes
Message-Id: <753ea5$55t$1@nnrp1.dejanews.com>
In article <752qp6$l1n$1@nnrp1.dejanews.com>,
cnsxxx@my-dejanews.com wrote:
> Hi,
>
> I have an associative array/hash (%myhash) as follows
>
> key val
> --- ---
> abc 1
> def 12
> ghi 6
>
> How do I sort the hash to print out both the keys and values
> sorted by the values?
perlfaq4 - Data Manipulation :
How do I sort a hash (optionally by value instead of key)?
The only variation from the faq would be that you would want to
use '<=>' instead of 'cmp', since you want (I assume) a numerical
sort as opposed to an ascii sort ... otherwise 12 would come
before 6:
%myhash = qw(abc 1 def 12 ghi 6);
@keys = sort { $myhash{$a} <=> $myhash{$b} } keys %myhash;
print "key value\n--- ---\n";
foreach (@keys) {print "$_ $myhash{$_}\n"; }
will print:
key value
--- ---
abc 1
ghi 6
def 12
Patrick Timmins
$monger{Omaha}[0]
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 14 Dec 1998 16:34:20 GMT
From: dave@mag-sol.com
Subject: Re: sorting hashes
Message-Id: <753emc$5ib$1@nnrp1.dejanews.com>
In article <752qp6$l1n$1@nnrp1.dejanews.com>,
cnsxxx@my-dejanews.com wrote:
> Hi,
>
> I have an associative array/hash (%myhash) as follows
>
> key val
> --- ---
> abc 1
> def 12
> ghi 6
>
> How do I sort the hash to print out both the keys and values
> sorted by the values?
my %hash = (abc=>1, def=>12, ghi=>6);
print map { "$_ => $hash{$_}\n" } sort { $hash{$a} <=> $hash{$b} } keys %hash;
Dave...
--
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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.misc (and this Digest), send your
article to perl-users@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.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
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 V8 Issue 4420
**************************************