[11519] in Perl-Users-Digest
Perl-Users Digest, Issue: 5119 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Mar 12 12:07:21 1999
Date: Fri, 12 Mar 99 09:00:22 -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 Fri, 12 Mar 1999 Volume: 8 Number: 5119
Today's topics:
Re:
Re:
Re:
Re: =?iso-8859-1?Q?=80help--newbie_script_won't_work=80 (Sam Holden)
Re: Are negative array indeces allowed? (Abigail)
Re: Are negative array indeces allowed? <eedalf@eed.ericsson.se>
B compiler problems; Perl to C utility <sbharvey@west.raytheon.com>
Re: Can I turn a Perl program into an NT .exe? <greenej@my-dejanews.com>
Re: Can Perl do this? <eedalf@eed.ericsson.se>
Re: Can't Increment Counter in FILE Using http:// (Abigail)
Re: CGI.pm param persistence question <chogan@primenet.com>
command-line CGI <dave@peon.oit.umass.edu>
Re: command-line CGI <Tony.Curtis+usenet@vcpc.univie.ac.at>
Re: Dates <eedalf@eed.ericsson.se>
Re: does perl discourage obfuscated code? (was Re: Perl <admin@asarian-host.org>
Re: FAQ 3.21: How can I hide the source for my Perl pro (Sam Holden)
Re: FAQ 3.21: How can I hide the source for my Perl pro (Michael Rubenstein)
Re: Help converting perl website to a Windows CD <dturley@pobox.com>
IDE for Perl swamichandra@my-dejanews.com
Re: Learn the truth - In Dear Recruiter we establish ex <revjack@radix.net>
Re: Learn the truth - In Dear Recruiter we establish ex (Jonathan Stowe)
Re: Learn the truth - In Dear Recruiter we establish ex prino@my-dejanews.com
Re: make exe from perl skript <hal9000@fetchmail.com>
pearl interperter for windows acores3866@my-dejanews.com
Re: problems with readdir (Jeff Strike)
Prying Eyes/Virtual Directory Listing/copying editor@dvar.com
Re: Serial Connection (Andrew M. Langmead)
Re: signal handling - 'IGNORE' vs 'sub {}' (Andrew M. Langmead)
sorting an array with directories <Michael.Hellmann@nbg6.siemens.de>
Re: sorting an array with directories <eedalf@eed.ericsson.se>
Re: Working with single characters (Abigail)
Re: write/format bypasses tie? (Sean McAfee)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 12 Mar 1999 11:42:54 -0400
From: bingdo19@earthlink.net (Bob Langdon)
Subject:
Message-Id: <bingdo19-ya02408000R1203991142540001@news.alt.net>
Special thanks to James Tolley <jamesht@idt.net> who e-mailed me to share:
>> Glad to hear it's working for you. But if you want to improve it
>> slightly, use unlink() instead of rename().
>
> instead of:
>
>>rename ("$dir/$file" , "$dir/$1") or die "Couldn't rename $dir/$file. $!\n";
>
> use:
>
> unlink("$dir/$file") or die "Couldn't unlink the file $dir/$file: $!";
Thanks James!
In article <in-1103992349410001@1cust223.tnt6.syracuse.ny.da.uu.net>,
in@after.noon (Friday@Dragnet) wrote:
<Finally got it working:
>
> ###############################
> #!/usr/bin/perl -w
> use strict;
> my $dir = '/home/gigs/public_html/bbs';
> opendir (BBS, $dir) or die "Couldn't open $dir. $!\n";
> foreach my $file (readdir BBS) {
> if ($file =~ /(.*)\.html$/) {
> rename ("$dir/$file" , "$dir/$1") or die "Couldn't rename $dir/$file.
$!\n";
> }
> }
> ##########################################
------------------------------
Date: Thu, 11 Mar 1999 20:30:56 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re:
Message-Id: <MPG.1152384ff8cfd61898972a@nntp.hpl.hp.com>
In article <gd99c7.379.ln@magna.metronet.com> on Thu, 11 Mar 1999
15:34:56 -0500, Tad McClellan <tadmc@metronet.com >says...
...
> opendir(BBS, '/home/gigs/public_html/bbs') ||
> die "could not open '/home/gigs/public_html/bbs' $!";
...
> rename( $file, $newname) || die "could not move '$file' $!";
^ ^
Oops. Better prepend the directory path in both marked places.
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personl/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Fri, 12 Mar 1999 15:48:07 GMT
From: gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re:
Message-Id: <36e936f4.5484279@news.dircon.co.uk>
On Fri, 12 Mar 1999 09:49:51 -0400, bingdo19@earthlink.net (Bob
Langdon) wrote:
>Oh no! More sh*t to memorize!
>
>What is -T?
>
>And why use it only in CGI?
>
You could of course read the perlrun and perlsec manpages to find this
out ...
/J\
------------------------------
Date: Fri, 12 Mar 1999 11:39:57 -0400
From: bingdo19@earthlink.net (Bob Langdon)
Subject: Re:
Message-Id: <bingdo19-ya02408000R1203991139570001@news.alt.net>
And special thanks to James Tolley <jamesht@idt.net> who e-mailed me to share:
> Glad to hear it's working for you. But if you want to improve it
> slightly, use unlink().
> instead of:
>>rename ("$dir/$file" , "$dir/$1") or die "Couldn't rename $dir/$file. $!\n";
>
> use:
> unlink("$dir/$file") or die "Couldn't unlink the file $dir/$file: $!";
Thanks James!
In article <in-1103992349410001@1cust223.tnt6.syracuse.ny.da.uu.net>,
in@after.noon (Friday@Dragnet) wrote:
> In article <MPG.1151cdc41a82b7d989722@nntp.hpl.hp.com>, lr@hpl.hp.com
> (Larry Rosler) wrote:
>
> > The real problem is here. You tried to change the value of the
> temporary variable $file
> > (and wouldn't succeed, because the right-hand side is a string, not a
> > substitution operator), but that wouldn't change the name of the file in
> > the file system, would it? You need to ask the OS to do that
> Thanks Larry!
>
> That did the trick:
>
> ###############################
> #!/usr/bin/perl -w
> use strict;
> my $dir = '/home/gigs/public_html/bbs';
> opendir (BBS, $dir) or die "Couldn't open $dir. $!\n";
> foreach my $file (readdir BBS) {
> if ($file =~ /(.*)\.html$/) {
> rename ("$dir/$file" , "$dir/$1") or die "Couldn't rename $dir/$file.
$!\n";
> }
> }
> ##########################################
--
+++++++++++++++++++++++++++++++++++++++++++++++++++++
Bob Langdon
webmaster@retailernews.com
http://RetailerNews.com
_Retailer News Online_ Magazine -- for retail
business owners, managers, and salespeople.
--brought to you by:
Dealer Support Services
--website design and maintenance
++++++++++++++++++++++++++++++++++++++++++++++++++++
------------------------------
Date: 12 Mar 1999 15:02:12 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: =?iso-8859-1?Q?=80help--newbie_script_won't_work=80?=
Message-Id: <slrn7eib3k.415.sholden@pgrad.cs.usyd.edu.au>
On Fri, 12 Mar 1999 09:49:51 -0400, Bob Langdon <bingdo19@earthlink.net> wrote:
>Oh no! More sh*t to memorize!
>
>What is -T?
The documentation in perlrun and perlsec may be of interest.
>
>And why use it only in CGI?
You don't, but that is one area where you are executing code with
input that is untrusted. In a sense you are letting anyone out there
execute that bit of code on your machine - better make sure they don't
do things you don't want them too.
--
Sam
You can write Perl programs that resemble sed, or awk, or C, or Lisp, or
Python. This is Officially Okay in Perl culture.
--Larry Wall
------------------------------
Date: 12 Mar 1999 15:57:54 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Are negative array indeces allowed?
Message-Id: <7cbdi2$nmu$1@client2.news.psi.net>
Alex Farber (eedalf@eed.ericsson.se) wrote on MMXIX September MCMXCIII in
<URL:news:36E8FDDF.6CDF54E3@eed.ericsson.se>:
"" Hi,
""
"" I have just discovered that perl -e '@x = qw (a b c); print $x[-3]'
"" prints "a" on my Solaris workstation (perl 5.004_04). So, is a
"" negative array index allowed? Amazing, I haven't ever read about it
"" in the 5 perl books I have or in "perldoc perldata"... When was it
"" introduced? Can I rely on it now?
Hmmm.
$ man perldata
...
Perl has three data structures: scalars, arrays of scalars,
and associative arrays of scalars, known as "hashes".
Normal arrays are indexed by number, starting with 0.
(Negative subscripts count from the end.) Hash arrays are
indexed by string.
...
$
It's in the first paragraph.....
Abigail
--
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'
------------------------------
Date: Fri, 12 Mar 1999 17:14:30 +0100
From: Alex Farber <eedalf@eed.ericsson.se>
Subject: Re: Are negative array indeces allowed?
Message-Id: <36E93D66.293E4F86@eed.ericsson.se>
Abigail wrote:
> $ man perldata
> ...
> Perl has three data structures: scalars, arrays of scalars,
> and associative arrays of scalars, known as "hashes".
> Normal arrays are indexed by number, starting with 0.
> (Negative subscripts count from the end.) Hash arrays are
> indexed by string.
> ...
> $
>
> It's in the first paragraph.....
Oops I have overseen it, really stupid! Thanks
/Alex
------------------------------
Date: Fri, 12 Mar 1999 07:31:28 -0800
From: Scott Harvey <sbharvey@west.raytheon.com>
Subject: B compiler problems; Perl to C utility
Message-Id: <36E93350.6071@west.raytheon.com>
Hello,
I downloaded the module Compile-a3.tar.gz. I am having trouble getting
it to work on Linux RH 5.2 system. I have run the make file utility in
the make file utility in the README file.
When I tried to run the utility perl -MO=C file.pl > file.c. I got an
error on line 2 of O.pm module. It appears that B.o relocatable module
is not being found or not loading correctly.
Scott Harvey
------------------------------
Date: Fri, 12 Mar 1999 15:42:47 GMT
From: JAG <greenej@my-dejanews.com>
Subject: Re: Can I turn a Perl program into an NT .exe?
Message-Id: <7cbcll$fp8$1@nnrp1.dejanews.com>
In article <36e8b537.0@news.networktel.net>,
"Eric" <green@networktel.net> wrote:
> I think the Perl2Exe does not create true standalone exes. That version may
> be released in the PDK (Perl Development Kit). The current Perl2Exe
> requires perl to be installed on the computer running the exe -- doesnt make
> much since! I think their reasoning was creating exes for cgi. If I am
> incorrect somebody please post some new info because I have been wanting to
> compile true perl standalones.
>
> Eric Greenwood
>
Perl2Exe requires that you copy the PerlCRT.DLL along with the .exe you
generated, but with these two files, my script can be run on a 'vanilla' WinNT
box without perl. I was so impressed that I actually am considering (gasp)
registering and paying for Perl2Exe!
# James Greene - Informatics Consulting - D-79539 Loerrach, Germany
# Internet: www.gucc.org/greene/consult - greene@gucc.org
# PGP Fingerprint: CA88 9BE2 92B3 3162 DF6B 7080 2F9E A97E F25C 5972
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Fri, 12 Mar 1999 17:20:26 +0100
From: Alex Farber <eedalf@eed.ericsson.se>
To: soclc@hkusua.hku.hk
Subject: Re: Can Perl do this?
Message-Id: <36E93ECA.E85986D8@eed.ericsson.se>
Charles So wrote:
> Can a Unix server remotely execute a Windows 95 program (with command
> line parameters) residing over a TCP network with Perl?
I would probably install a web server on Windows95 server
and LWP module (or wget or curl) at the UNIX computer and
use CGI to call that program.
/Alex
------------------------------
Date: 12 Mar 1999 15:41:38 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Can't Increment Counter in FILE Using http://
Message-Id: <7cbcji$ng5$1@client2.news.psi.net>
George Crissman (strads@tmisnet.com) wrote on MMXIX September MCMXCIII in
<URL:news:36e88bb1.12273154@news2.tmisnet.com>:
``
`` I thought maybe Perl worked differently when called by a
`` browser as compared to the command line.
Of course not. That would be stupid. Besides, Perl cannot know whether
it's called from a browser.
Abigail
--
perl -wle 'print "Prime" if (1 x shift) !~ /^1?$|^(11+?)\1+$/'
------------------------------
Date: 12 Mar 1999 16:33:55 GMT
From: Craig Hogan <chogan@primenet.com>
Subject: Re: CGI.pm param persistence question
Message-Id: <7cbflj$67n$1@nnrp03.primenet.com>
Ronald J Kimball <rjk@linguist.dartmouth.edu> wrote:
: Craig Hogan <chogan@primenet.com> wrote:
: > Fine. But I mention this because if I want to CHANGE the value of a
: > variable going through hidden, I have to do
: > $Query->delete('myvariable') first.
: You do? Can't you just change the value as normal?
: $Query->param('myvariable', 'myvalue);
: Or specify it in hidden()?
: print $Query->hidden('myvariable', 'myvalue');
Well, I just read the latest CGI.pm manpage and apparently in version
2.0 and later the author decided to force you to change the value
because it works better with shopping carts. He says to do:
$Query->param('myvariable', 'myvalue');
$Query->hidden('myvariable');
Which is pretty much what you said. But it doesn't work for me! I
have to do delete.
: > My question is: Why do I have to do this if every time the script is
: > invoked I am declaring a new object? Shouldn't the new object be
: > created with all the current hidden values?
: Huh? I thought you just said that the new object _is_ created that way.
No... It _is_ for all the other form variables, but not for the one I
am changing. It keeps the old value.
Craig
--
.....................................................................
[ Craig Hogan ! Cure TAB archive, live Cure recordings: ]
[ chogan@primenet.com ! http://www.primenet.com/~chogan/index.html ]
[ Software Engineer ! "Smear this man across the wall" ]
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
------------------------------
Date: Fri, 12 Mar 1999 11:04:32 -0500
From: Dave Heaney <dave@peon.oit.umass.edu>
Subject: command-line CGI
Message-Id: <36E93B10.760E5132@peon.oit.umass.edu>
I'm writing some CGI programs for work, and I would like to be able to
test them from a command line, rather than having to test them on the
web. Is there any way to simulate the QUERY_STRING from the command
line? Thank you very much.
-Dave
------------------------------
Date: 12 Mar 1999 17:43:17 +0100
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: command-line CGI
Message-Id: <83k8wm3bh6.fsf@vcpc.univie.ac.at>
Re: command-line CGI, Dave <dave@peon.oit.umass.edu>
said:
Dave> I'm writing some CGI programs for work, and I
Dave> would like to be able to test them from a
Dave> command line, rather than having to test them
Dave> on the web. Is there any way to simulate the
Dave> QUERY_STRING from the command line? Thank you
Dave> very much.
This is trivial (sort of) with CGI.pm, q.v.
hth
tony
--
Tony Curtis, Systems Manager, VCPC, | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien. | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds! | private email:
Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>
------------------------------
Date: Fri, 12 Mar 1999 17:18:09 +0100
From: Alex Farber <eedalf@eed.ericsson.se>
To: John Corbin <jcorbin@apci.net>
Subject: Re: Dates
Message-Id: <36E93E41.524E912@eed.ericsson.se>
John Corbin wrote:
> Can someone gimme a pointer on how to subtract a date from current date?
Date::Calc module can help - see
http://www.engelschall.com/u/sb/download/Date-Calc/
/Alex
------------------------------
Date: Fri, 12 Mar 1999 16:09:20 +0100
From: Mark <admin@asarian-host.org>
Subject: Re: does perl discourage obfuscated code? (was Re: Perl evangelism)
Message-Id: <199903121511.IAA29577@asarian-host.org>
Although Perl does not in and by itself discourage or encourge anything, the
means it provides to express yourself, like any language, largely determines
whether we regard the things we want to do as obfuscate or lucid.
But I think there are two scales here that we should consider: "useless to
powerful" vs. "terse and legible". You cannot make a statement about a value
on one of the scales, without relating it to the other too. For instance,
very powerful instructions tend to be more terse than easier ones. Since
Perl is extremely powerful, it can pack a multitude of operations into a
single line. Now, you can look at this from the "terse and legible" scale,
and conclude that Perl promotes obfuscate coding. But by the same measure,
seen from the "useless to powerful" scale, you can just as easily state that
Perl promotes powerful coding. My point being still, that you cannot look at
one very dense line of code and call it obfuscate just because your mind is
being dazzled by the amount of things that happen in this one line: one is
the result of the other. In fact, perl regexs are so powerful that to the
newbie mind they will appear to be magical. But if you were to "unroll" such
a powerful regex and rewrite it in C, your code would grow by an order of
magnitude and would not necessarily be more clear. The way a C programmer
has to use >, <, --, and ++ signs to even get a simple loop going without
un- or overflowing, is not encouraging anything, but only discouraging usage
of the entire language itself. Not dissing C or anything, but I have found
Perl to be the most refreshing thing since ice-cream.
- Mark
System Administrator Asarian-host.org
--
For more information about this posting service, contact:
help@asarian-host.org -- for info about our services
admin@asarian-host.org -- for the server's administrator
nclark@asarian-host.org -- for our PR manager
irchelper@asarian-host.org -- for help on irc matters
If you want an anonymous account, visit our sign-up page:
http://asarian-host.org/emailform.html
------------------------------
Date: 12 Mar 1999 15:05:32 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: FAQ 3.21: How can I hide the source for my Perl program?
Message-Id: <slrn7eib9s.415.sholden@pgrad.cs.usyd.edu.au>
On Fri, 12 Mar 1999 09:20:34 -0500, John Moreno <planb@newsreaders.com> wrote:
>Ronald J Kimball <rjk@linguist.dartmouth.edu> wrote:
>
>> Instead, banks have guards, cameras, vaults, alarms, etc. And even
>> though everybody knows about most of the security measures, it's not
>> easy to rob a bank.
>
>Actually, if your willing to shoot someone it is.
OK, it's not easy to rob a bank and not end up dead or in jail...
--
Sam
Even if you aren't in doubt, consider the mental welfare of the person
who has to maintain the code after you, and who will probably put parens
in the wrong place. --Larry Wall
------------------------------
Date: Fri, 12 Mar 1999 16:31:04 GMT
From: miker3@ix.netcom.com (Michael Rubenstein)
Subject: Re: FAQ 3.21: How can I hide the source for my Perl program?
Message-Id: <36ed40be.53215079@nntp.ix.netcom.com>
On Fri, 12 Mar 1999 05:28:33 -0500, rjk@linguist.dartmouth.edu (Ronald
J Kimball) wrote:
>Not at all. Limiting access is not the same as obscurity.
>
>For example, you will find very few banks masquerading as fast food
>restaurants. If that were the only security measure a bank took, they
>would be easy pickings for anyone who knew where to find them. That
>would be security through obscurity.
But it does protect the banks from poeple like you who are unaware of
their presence :-)
--
Michael M Rubenstein
------------------------------
Date: Fri, 12 Mar 1999 16:38:29 GMT
From: David Turley <dturley@pobox.com>
Subject: Re: Help converting perl website to a Windows CD
Message-Id: <7cbfu3$j6b$1@nnrp1.dejanews.com>
In article <36e6abba.13632392@news.bobcat.dynip.com>,
horseyride@hotmail.com (Adam) wrote:
> I have a perl program that read in a template and generates an HTML
> page on the fly incorporating a specified image.
>
> It takes the form /cgi-bin/process.pl?item=300
>
> I have about 15000 images. Now the customer wants to make a CD of his
> web site. I tried using PERL2EXE to make an executable but ---
>
> 1. Can't figure out get the executable to read the ?item=300 part
> 2. Output seems directed to a windows dos box, not the browser
> 3. How would I call it from the browser anyway
I think I just answered this last week. You still need to have web server if
you are going to run a cgi script from the browser. Period. Making an exe
file using perl2exe isn't going to help you. Have a peak at
http://www.demobuilder.com/ and look at their product called MicroWeb (That's
the same people who make perl2exe)
It includes a minimal perl and a server. you can create a package that has a
complete web site on cd, including runing cgi scripts.
This is for informational purposes only. I offer no endorsement.
--
David Turley
dturley@pobox.com
http://www.binary.net/dturley
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Fri, 12 Mar 1999 15:55:28 GMT
From: swamichandra@my-dejanews.com
Subject: IDE for Perl
Message-Id: <7cbdda$ggs$1@nnrp1.dejanews.com>
Is there any IDE (preferably graphical other than X-Emacs) for Perl
programming.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 12 Mar 1999 15:05:50 GMT
From: Flagstaff Candace <revjack@radix.net>
Subject: Re: Learn the truth - In Dear Recruiter we establish exactly what a recruiter does.
Message-Id: <7cbage$jn$1@news1.Radix.Net>
Keywords: Hexapodia as the key insight
[snip]
Sounds like someone didn't get the job.
Followups set.
--
/~\ concourse miff Polaris Eucharist attribution epithelium Novembe
C oo deciduous exotica oratorical debtor exorcist that BMW tumbrel i
_( ^) 1 , 0 0 0 , 0 0 0 m o n k e y s c a n ' t b e w r o n g
/___~\ http://3509641275/~revjack 03/12/99 10:05:41 revjack@radix.net
------------------------------
Date: Fri, 12 Mar 1999 15:54:23 GMT
From: gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Learn the truth - In Dear Recruiter we establish exactly what a recruiter does.
Message-Id: <36e9386b.5859045@news.dircon.co.uk>
On Fri, 12 Mar 1999 14:44:45 GMT, QualifiedConsultant
<computer_consultant7@my-dejanews.com> wrote:
>This is the first in a series of documents I will be writing to educate the
>computer consulting industry as a whole.
>
I sincerely hope not ....
<followups set>
/J\
------------------------------
Date: Fri, 12 Mar 1999 16:40:13 GMT
From: prino@my-dejanews.com
Subject: Re: Learn the truth - In Dear Recruiter we establish exactly what a recruiter does.
Message-Id: <7cbg1a$j92$1@nnrp1.dejanews.com>
In article <7cb98q$cb3$1@nnrp1.dejanews.com>,
QualifiedConsultant <computer_consultant7@my-dejanews.com> wrote:
> This is the first in a series of documents I will be writing to educate the
> computer consulting industry as a whole.
<snipped true but irrelevant text>
Message forwarded to abuse@dejanews.com
Robert
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Fri, 12 Mar 1999 16:23:26 +0100
From: hal 9000 <hal9000@fetchmail.com>
To: Georg Raming <raming@ewh.uni-hannover.de>
Subject: Re: make exe from perl skript
Message-Id: <36E9316E.C287685B@fetchmail.com>
Georg Raming wrote:
>
> Sorry, I just read something and assume
> "perl2exe" is the solution!
Maybe...
I definitely would have said so untill recently, but then I
got this information in another (similar) thread:
"Randal L. Schwartz" wrote:
>
> >>>>> "hal" == hal 9000 <hal9000@fetchmail.com> writes:
>
> hal> Perl2Exe at <http://www.demobuilder.com/perl2exe.htm> looks
> hal> as what you are after. I have not yet tried it myself
> hal> though...
>
> >From what's been said here many times, perl2exe is NOT a compiler.
> It's merely a distribution bundler. It's still the same old Perl
> compiling and executing the same old program every time you say go.
>
> IMHO, Don't spend money for such a useless product. <sigh>
--
~hal9000
------------------------------
Date: Fri, 12 Mar 1999 16:02:38 GMT
From: acores3866@my-dejanews.com
Subject: pearl interperter for windows
Message-Id: <7cbdql$gva$1@nnrp1.dejanews.com>
I want to use a Pearl program on my PC, but i guess i need an interperter.
Where can i get one?
Tank you.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Fri, 12 Mar 1999 16:45:15 GMT
From: jstrike@wje.com (Jeff Strike)
Subject: Re: problems with readdir
Message-Id: <7cbgb0$7g@newsops.execpc.com>
Thanks, although I rewrote most of the program and don't need that
right now, I know it will come in handy in the future. The main
problem was that I was not in the same directory as the files when I
did the stat. I put a chdir in there and it works fine on the
development server at my house. When I transfer it to the production
web server at work it still fails. I think now it's just a matter of
setting something in IIS.
Thanks to everyone for the great help.
Jeff Strike
Sr. Systems Analyst
Wiss, Janney, Elstner Associates, Inc.
Northbrook, IL
rjk@linguist.dartmouth.edu (Ronald J Kimball) wrote:
><jstrike@execpc.com> wrote:
>
>> ## I don't like doing this but I don't know of a way to get the length
>> of the
>> ## arrary that contains the dirlist.
>
>scalar(@array) is the number of elements in @array. i.e.:
>
> $count = @array; # implicit scalar context
> print "There are $count items in @array.\n";
>
>
>$#array is the index of the last element in @array. i.e.:
>
> print "\@array starts at 0 and ends at $#array.\n";
------------------------------
Date: Fri, 12 Mar 1999 17:52:49 +0100
From: editor@dvar.com
Subject: Prying Eyes/Virtual Directory Listing/copying
Message-Id: <36E94661.5A4B@dvar.com>
Hi everybody,
Who know what's the best way to protect DATA, SCRIPTS AND HTML FILES
against prying eyes/Virtual Directory Listing and COPYING from the web.
I really want protection and at the same time execution.
Please read the following: that's what I've done and send your tips and
comments.
1.
Now I've tried chmod 711, 733 and 766 they work well but I'm not sure if
this is "maximum" protection....BESIDES, there are lots of scripts that
wants their data directory chmod 777
2. I've tried .HTACCESS too. This works perfect! but allows execution
ONLY with a password...I want protection and execution without password.
Am I doing some thing wrong? Or it's just not Possible to do what I want
with .htaccess
and
3.
I've placed an index.html file in each directory. But is this "maximum"
protection.
All tips & comments are welcome.
Thanking you in anticipation
------------------------------
Date: Fri, 12 Mar 1999 15:50:06 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Serial Connection
Message-Id: <F8HnzI.5LB@world.std.com>
Marcel Ackerknecht <styroNO@SPAMdial.eunet.ch> writes:
>how can i manage a serial connection via ttyS0 in perl
>(setting baudrate etc) and getting unbufferd, pollable input
Most modern Unix use the termios API for terminal control. In Perl,
the interface to these functions are in POSIX::Termios. The setispeed
and setospeed methods set the baud rate, and unsetting ICANON in the
set_lflag method will disable the line by line input and the special
processing of certain control characters.
>without the need to wait for a CR.
Once in the terminal driver is in "raw" mode, then you can use
select() to see if a character is avaiable and sysread to retrieve it.
--
Andrew Langmead
------------------------------
Date: Fri, 12 Mar 1999 15:31:55 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: signal handling - 'IGNORE' vs 'sub {}'
Message-Id: <F8Hn58.Dy7@world.std.com>
Alex Davies <Alex.Davies@tiuk.ti.com> writes:
>Can someone please explain how the 'IGNORE' (and 'DEFAULT') signal
>handlers are supposed to work...
>I assumed that:
>$SIG{'__WARN__'} = 'IGNORE';
>and
>$SIG{'__WARN__'} = sub {};
>would behave the same - that is both suppress warnings - but this
>doesn't
>seem to be the case:
Setting an element of the %SIG hash to 'IGNORE' tells perl to tell the
kernel to not even deliver the signal to the application. Setting it
to a coderef that does nothing tells perl to tell the kernel to
deliver the signal, and tells perl to ignore it.
Since the __WARN__, __DIE__, and __PARSE__ hooks are all fake signals
internally generated by perl, having perl tell the OS not to generate
them is futile.
On the other hand, there may be reasons for people to expect 'IGNORE'
to work on pseudo-signals as well. If so, then you might want to send
a bug report using the perlbug utility.
--
Andrew Langmead
------------------------------
Date: Fri, 12 Mar 1999 16:08:00 +0100
From: Michael Hellmann <Michael.Hellmann@nbg6.siemens.de>
Subject: sorting an array with directories
Message-Id: <36E92DD0.469F0079@nbg6.siemens.de>
Hi all,
I have a stupid sorting problem.
The program above gives the following output:
/home/s/src/code
/home/s/src/code-
/home/s/src/code/na
What I need is:
/home/s/src/code
/home/s/src/code/na
/home/s/src/code-
The '/' must be a higher priority as '-+.' for the 'sort'-command.
I know, I could change all '/' into e.g. '!!!' before sorting and
in the other direction after sorting, but I'am sure, there must be
an other (faster) way to solve my problem.
Please, help me with an short code example.
Thanks in advance,
Michael
#!/usr/local/bin/perl
@r = ("/home/s/src/code-","/home/s/src/code","/home/s/src/code/na");
@r = sort @r;
while (@r)
{
$r = shift @r;
print "$r\n";
}
--
Michael.Hellmann@nbg6.siemens.de
------------------------------
Date: Fri, 12 Mar 1999 17:37:54 +0100
From: Alex Farber <eedalf@eed.ericsson.se>
To: Michael Hellmann <Michael.Hellmann@nbg6.siemens.de>
Subject: Re: sorting an array with directories
Message-Id: <36E942E2.49901479@eed.ericsson.se>
Hi,
here's my solution, though I maybe
haven't checked all the possibilities.
/Alex
#!/usr/local/bin/perl
@r = ("/home/s/src/code-","/home/s/src/code","/home/s/src/code/na");
@r = sort myway @r; # see perldoc -f sort
while (@r)
{
$r = shift @r;
print "$r\n";
}
sub myway
{
my ($a1, $a2, $b1, $b2);
while (1)
{
$a =~ /(.*)([-+\/])/g;
($a1, $a2) = ($1, $2);
$b =~ /(.*)([-+\/])/g;
($b1, $b2) = ($1, $2);
return $a1 cmp $b1 if $a1 cmp $b1;
return -($a2 cmp $b2) if $a2 ne $b2;
}
}
Michael Hellmann wrote:
> What I need is:
> /home/s/src/code
> /home/s/src/code/na
> /home/s/src/code-
------------------------------
Date: 12 Mar 1999 16:29:56 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Working with single characters
Message-Id: <7cbfe4$nmu$2@client2.news.psi.net>
Mike Schiraldi (mgs21@columbia.edu) wrote on MMXIX September MCMXCIII in
<URL:news:Pine.GSO.3.95qL.990312053901.27634A-100000@merhaba.cc.columbia.edu>:
\\
\\ I'm also going to represent the board as a single array of length 64, instead
\\ of an 8 by 8 array, to save on overhead. Should i just store the whole board as
\\ a string?
If your environment is such that you're concerned about the overhead of
an 8 by 8 array vs a single 64 element array, you shouldn't even think
of using Perl.
Abigail
--
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'
------------------------------
Date: Fri, 12 Mar 1999 16:15:16 GMT
From: mcafee@waits.facilities.med.umich.edu (Sean McAfee)
Subject: Re: write/format bypasses tie?
Message-Id: <o4bG2.11211$Ge3.44149741@news.itd.umich.edu>
In article <36E91DF2.6DCB3732@home.com>,
Rick Delaney <rick.delaney@home.com> wrote:
>[posted & mailed]
>Sean McAfee wrote:
>> I added a line 'syswrite(STDOUT, "foo", 3);' to my program above, and got
>> this error message:
>> Can't locate object method "WRITE" via package "IO::Scalar" at pp line 4.
>Oh, yeah. WRITE is for syswrite. There is no method for write.
I still thought it was worth a try, since for all I knew write/format might
be implemented internally by using syswrite.
>You could set up your own method that is similar to the swrite in
>perlform, but that might be more trouble than it's worth.
Yeah, I came to that conclusion pretty quickly. I'd hate to have to put
any extra code into my report-generating subroutines, some of which are
as simple as:
sub report_1 {
local *data = do_query q(select ...); # returns ref to LoL
local ($~, $^) = qw(REPORT1 REPORT1_TOP);
$- = 0;
write foreach @data;
}
--
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: 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 5119
**************************************