[12684] in Perl-Users-Digest
Perl-Users Digest, Issue: 93 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jul 9 14:17:22 1999
Date: Fri, 9 Jul 1999 11:10:08 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 9 Jul 1999 Volume: 9 Number: 93
Today's topics:
Re: Correct syntax for NT drives <aperrin@mcmahon.qal.berkeley.edu>
Re: ftp <cassell@mail.cor.epa.gov>
Re: getpwent will not share array data outside while. <rick.delaney@home.com>
Re: Help -- Weird Increments (MacPerl) (Jenda Krynicky)
Re: HELP! how do I run remsh commands from a script? <andycha@globalnet.co.uk>
Re: HELP! how do I run remsh commands from a script? <jrennie@mitre.org>
Re: I need to hide the source <juex@my-dejanews.com>
Re: I need to hide the source (Greg Bacon)
Making a hog out of perl <burton@lucent.com>
Message Queues <fungs@logica.com>
Re: Program for Easy Writing of Perl Code <stampes@xilinx.com>
Quest: pingecho for Linux. <rwilliamson@uno.gers.com>
Re: Random Numbers <cassell@mail.cor.epa.gov>
Re: sending ALT sequence to program (Jenda Krynicky)
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 09 Jul 1999 10:00:01 -0700
From: Andrew J Perrin <aperrin@mcmahon.qal.berkeley.edu>
Subject: Re: Correct syntax for NT drives
Message-Id: <37862A91.E3BD3F78@mcmahon.qal.berkeley.edu>
> "Jim Ray" <jim.ray@west.boeing.com> wrote:
> > $filepath = "\\nt-delta-02\epmr\PMR-B\Program_Quality;
1.) I assume you retyped instead of cutting and pasting, since there's no
trailing quote on the line at all. There are few circumstances in which at
would be helpful.
2.) I see no need for double-quotes in this situation, since you're not
interpolating anything - save yourself the headaches and use single quotes.
3.) Your backslashes are causing problems - try inserting:
print "File path is : $filepath\n";
immediately following the above statement, and note the scarcity of \
characters.
4.) You therefore either need to use / characters which will substitute just
fine, or double all of your \ characters.
--
-------------------------------------------------------------
Andrew Perrin - NT/Unix/Access Consulting - aperrin@mcmahon.qal.berkeley.edu
http://www.geocities.com/SiliconValley/Grid/7544/
-------------------------------------------------------------
------------------------------
Date: Fri, 09 Jul 1999 11:04:53 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
To: Ian Mortimer <ianmorty@nortelnetworks.com>
Subject: Re: ftp
Message-Id: <378639C5.345F9C13@mail.cor.epa.gov>
[courtesy cc also mailed to poster]
Ian Mortimer wrote:
>
> Thanks Abigail - but that was already mentioned !
>
> Perhaps you could supply some simple examples of where this has been
> used ????
Net::FTP . Seriously. Get it and look at the examples in the
documentation. Then if that's not enough, look at the code in
the Perl Cookbook.
Those should be enough to get you started.
HTH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Fri, 09 Jul 1999 17:09:17 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: getpwent will not share array data outside while.
Message-Id: <37862C88.743F147B@home.com>
[posted & mailed]
John Hennessy wrote:
>
> If I attempt a foreach $login (@list) outside
> of the while I get an empty list.
[snip]
> while (@list = getpwent())
To get outside the while, the condition must be false (unless you break
out with last). How many elements must @list have to make the while
condition false?
--
Rick Delaney
rick.delaney@home.com
------------------------------
Date: Fri, 09 Jul 1999 18:30:41 GMT
From: Jenda@McCann.cz (Jenda Krynicky)
Subject: Re: Help -- Weird Increments (MacPerl)
Message-Id: <1103_931545041@prague_main>
On Fri, 09 Jul 1999 12:07:04 GMT, bart.lateur@skynet.be (Bart Lateur) wrote:
> Jenda Krynicky wrote:
>
> >> flock() is unimplemented in MacPerl.
> >
> >I've never used MacPerl so I did not know this.
>
> Did you know that if the file is opened for writing by another program,
> that the open() will fail?
How could I?
> MacPerl scripts are currently sequentialized, so if only MacPerl scripts
> touch this file, there's no problem. But if there ever will be an update
> so that multiple scripts can try to access a file at the same time, this
> will be a problem.
You mean that until one script finishes no other can run?
I thought Macs are sometimes (not too often though) used as webservers ?!?
Jenda
http://Jenda.Krynicky.cz
------------------------------
Date: Fri, 9 Jul 1999 18:12:44 +0100
From: "Andy Chantrill" <andycha@globalnet.co.uk>
Subject: Re: HELP! how do I run remsh commands from a script?
Message-Id: <7m5akn$ngd$1@gxsn.com>
Try this:
system("remsh bob -l root -n file1 /file2");
HTH,
Andy.
Ranganath Sudarshan wrote in message ...
>Does anyone know how to run the UNIX command 'remsh' from within a perl
>script (like 'remsh bob -l root -n "file1 /file2" ')?
>
>And a more general question -- is there a general way to execute UNIX
>commands in Perl(like cp, ls, etc), or do we have to use canned
>Perl-specific functions or pre-written modules?
>
>Thanks!
>
------------------------------
Date: Fri, 09 Jul 1999 13:17:43 -0400
From: "Jason D. Rennie" <jrennie@mitre.org>
To: Ranganath Sudarshan <tsranga@leland.Stanford.EDU>
Subject: Re: HELP! how do I run remsh commands from a script?
Message-Id: <37862EB7.3F800E93@mitre.org>
Ranganath Sudarshan wrote:
>
> Does anyone know how to run the UNIX command 'remsh' from within a perl
> script (like 'remsh bob -l root -n "file1 /file2" ')?
>
> And a more general question -- is there a general way to execute UNIX
> commands in Perl(like cp, ls, etc), or do we have to use canned
> Perl-specific functions or pre-written modules?
Read the documentation on the perl functions 'system' and 'open'
'system' allows you to execute a program as you would from the
command prompt (e.g. system ("echo foo bar > some_file")
'open' allows you the added functionality of piping in or piping
out data (e.g. open (LS, "ls |"); while (<LS>) {print;})
Jason Rennie
781-271-7281
jrennie@mitre.org
http://www.andrew.cmu.edu/~jr6b/
------------------------------
Date: Fri, 9 Jul 1999 10:22:08 -0700
From: "Jürgen Exner" <juex@my-dejanews.com>
Subject: Re: I need to hide the source
Message-Id: <7m5b1v$d6l@news.dns.microsoft.com>
Clive Newall <crn@itga.com.au> wrote in message
news:v5pv22ct3r.fsf@lightning.itga.com.au...
> "Jürgen Exner" <juex@my-dejanews.com> writes:
>
> > Abigail <abigail@delanet.com> wrote in message
> > news:slrn7o7lb6.ued.abigail@alexandra.delanet.com...
> > > rdosser@my-deja.com (rdosser@my-deja.com) wrote on MMCXXXVI September
> > > MCMXCIII in <URL:news:7m09vd$m44$1@nnrp1.deja.com>:
> > > ``
> > > `` I should have explained more: I'm trying to conceal a decryption
> > > `` algorithm for confidential data.
> > >
> > > And you don't trust root? Buhahhahhahahhahaa. That's stupid.
> > > Find a root who you can trust.
> >
> > Although I have to aggree that security by obsfucation is not the right
way
> > to go, still the administrator of e.g. a hospital network has no
business
> > reading my medical records.
> >
> > So not trusting root for confidential data is a very valid case.
>
> No. You cannot prevent root from breeching your security by technical
> means. Your *only* hope is to enforce such security by other means.
> Like hiring a good professional sysadmin.
> Like ensuring all staff understand your security policies & how they
> relate to confidential data.
>
> If you don't trust root there is only one solution: dismissal.
I still disagree on both accounts:
- You can protect you confidential data even from malicious sys-admins by
good encryption. Yes, even that can be breeched provided you employ enough
computation power, but usually even a sysadmin doesn't have the required
computer power available (unless he works for the CIA ;-) .
- And in e.g. Germany by law you must protect e.g. medical data in such a
way, that unauthorized persons don't have access to that data. Unauthorized
means the janitor for the file cabinet (which must be locked) just as well
as the sysadmin for online records.
jue
--
Jürgen Exner
------------------------------
Date: 9 Jul 1999 17:32:40 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: I need to hide the source
Message-Id: <7m5bno$brc$1@info2.uah.edu>
In article <7m5b1v$d6l@news.dns.microsoft.com>,
"Jürgen Exner" <juex@my-dejanews.com> writes:
: I still disagree on both accounts:
: - You can protect you confidential data even from malicious sys-admins by
: good encryption. Yes, even that can be breeched provided you employ enough
: computation power, but usually even a sysadmin doesn't have the required
: computer power available (unless he works for the CIA ;-) .
: - And in e.g. Germany by law you must protect e.g. medical data in such a
: way, that unauthorized persons don't have access to that data. Unauthorized
: means the janitor for the file cabinet (which must be locked) just as well
: as the sysadmin for online records.
How do you know root isn't intercepting your keystrokes or otherwise
watching for the clear data?
Greg
--
Artifical insemination is when the farmer does it to the cow instead of the
bull.
-- Funny Answers to Science Test Questions
------------------------------
Date: Fri, 09 Jul 1999 12:37:26 -0500
From: Burton Kent <burton@lucent.com>
Subject: Making a hog out of perl
Message-Id: <37863356.67E1400B@lucent.com>
I wrote a program that recursively analyzes SGML
documents. It converts mis-tagged SGML documents
to the correct format with minimal user guidance,
doing about 4 weeks of work in an afternoon.
Problem is, it's recursive, memory intensive, and
bombs at about 3-5 levels in, apparently due to
memory constraints. I optimized what I could,
making sure variables go out of scope ASAP for
garbage collection?
So I want to create a "Memory Hog Perl" that will
grab enough memory for two or three more levels of
recursion. All I've been able to find is that using
perl's malloc is faster, but can take more space.
What other options can I use to turn my perl into
swine?
B
------------------------------
Date: Tue, 6 Jul 1999 17:03:53 +0100
From: "Ming" <fungs@logica.com>
Subject: Message Queues
Message-Id: <7lt9dd$9t@romeo.logica.co.uk>
Has anyone out there got an implementation of message queues in Perl
I can use. It would be a life saver.
Thanks
Ming.
------------------------------
Date: 9 Jul 1999 15:59:58 GMT
From: Jeff Stampes <stampes@xilinx.com>
Subject: Re: Program for Easy Writing of Perl Code
Message-Id: <7m569u$1jb2@courier.xilinx.com>
Abigail <abigail@delanet.com> took the easy shot and sniped:
: Francisco Romero (fromero@csudh.edu) wrote on MMCXXXVIII September
: MCMXCIII in <URL:news:37859486.8CA70542@csudh.edu>:
: -- Does anyone know if there is an application that will help you write
: -- perl code with ease!
: vi
: -- I use inux.
: I've never heard of that.
http://www-masuda.is.s.u-tokyo.ac.jp/~kourai/inux/inux-en.html
--
Jeff Stampes -- Xilinx, Inc. -- Boulder, CO -- jeff.stampes@xilinx.com
------------------------------
Date: Fri, 9 Jul 1999 10:09:42 -0700
From: "Rusty Williamson" <rwilliamson@uno.gers.com>
Subject: Quest: pingecho for Linux.
Message-Id: <V0qh3.566$VX3.25938@news.connectnet.com>
Hi,
I need a way to determine if a Linux box is responding on the network. It
was suggested that another version of pingecho existed that would work (you
needed to be root but that's okay). Does anyone know of another version of
ping or a way to accomplish my goal?
Thanks,
Rusty
------------------------------
Date: Fri, 09 Jul 1999 11:00:59 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
To: watcher_q@my-deja.com
Subject: Re: Random Numbers
Message-Id: <378638DB.1C12D9C2@mail.cor.epa.gov>
Watcher wrote:
> [snip]
>
> I had suggested to the perl.porter-gw group to change it but no one
> replied. As I'm using perl to do some crypto work, it need a high-
> quality, high speed (Math::TrulyRandom is too slow) PRNG. I settled
Math::TrulyRandom may not be random anyway, merely chaotic.
I haven't seen an adequate analysis of it.
> with an algo that has randbits=32, period of 2^19937-1. It is slightly
> slower, about 1 microsec per rand() call on my machine and modest
> increase in memory. It has been successfully analysed, including
> spectral analysis. Furthermore, it has been implement from C to C++,
> Java, PHP, Excel, FORTRAN, Haskell. I had it compiled it in place of
> rand() and it seemed to work fine.
>
> You can get the details at http://www.math.keio.ac.jp/~matumoto/emt.html
Have you considered writing this as a Perl module, so that others
could benefit from it? I would suggest the name
Math::Rand_MT given your functional basis. How does this
compare to the random number generators of George Marsaglia?
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Fri, 09 Jul 1999 18:38:14 GMT
From: Jenda@McCann.cz (Jenda Krynicky)
Subject: Re: sending ALT sequence to program
Message-Id: <1104_931545494@prague_main>
On Thu, 8 Jul 1999 09:39:56 -0400, "Gary L. Drescher" <gld@alum.mit.edu> wrote:
> How can I use perl to include an ALT sequence in a character string sent as
> input to a running program (under Win98)? Thanks.
>
Win32::Setupsup
Instalable via PPM from http://jenda.krynicky.cz/perl/
HTH, Jenda
http://Jenda.Krynicky.cz
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 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.
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 V9 Issue 93
************************************