[8324] in Perl-Users-Digest
Perl-Users Digest, Issue: 1941 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Feb 20 12:13:49 1998
Date: Fri, 20 Feb 98 09:00:28 -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, 20 Feb 1998 Volume: 8 Number: 1941
Today's topics:
RE: Mailing List Perl Program? <Kate-Smalley@worldnet.att.net>
Re: 5.004 bug? invisible object dereferencing <ceh@sce.carleton.ca>
Re: Being Nice 2 Nice Beings [Was: Reading The FAQ's et (Nathan V. Patwardhan)
Re: Being Nice 2 Nice Beings [Was: Reading The FAQ's et <dhall@sportsline.com>
Re: Cucumber-type Question (Jack Ostroff)
Re: differences perl 4.0.1.8 -> 4.0.3.6 (Andrew M. Langmead)
Re: FAQless Forays (was: Code Example Needed) <cberry@cinenet.net>
Re: FTP files without Net::FTP? (Tom Grydeland)
Re: FTP files without Net::FTP? <john.kelly@citicorp.com>
Re: Help for Hashes !! <sgermain@nortel.ca>
Re: HELP! My ISP claims that Perl access is a serious <NerveGas@see_signature.com>
if (-d $filename) in Win32 perl.user@sndk.se
Re: Is perl and DBI good enough? (Brett Slocum)
JOB: Hotshot Perl Programmer wanted xvs-RemoveThisFirst-@yahoo.com
lwp-mirror: at vs cron <paul.joslin@sdrc.com>
Re: My first perl program, yippee! (Nathan V. Patwardhan)
NEWBIE: .= <seth@e-zcomputers.com>
Out of memory <thomas.johansson@unisource.se>
Re: Perl 4/5 - Part 2 (Jack Ostroff)
Re: Perl 4/5 (Richard Bellavance)
Re: Perl/sendmail file attatchment <john.kelly@citicorp.com>
Re: Perldebugger for Windows (Andrew M. Langmead)
Re: printing problem <corky@ultranet.com>
Re: printing problem (Andrew M. Langmead)
Re: Problem with pack() -- really print() adding CR in (Andrew M. Langmead)
Re: Problem with pack() -- really print() adding CR in (Jeffrey Drumm)
Re: Problem with pack() in perl 5.004_04? (Andrew M. Langmead)
Problems with perl embedded in inn <rdp@spike.palmer.com>
Re: RFC about ``Matt's Script Archive'' (M.J.T. Guy)
Re: Secure Path with setgid (Andrew M. Langmead)
Subroutine closing STDIN <zamboni@cs.purdue.edu>
Re: Year 10000 Compliance (Philip T. Kasiecki)
Re: Year 10000 Compliance (Morris M. Keesan)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 20 Feb 1998 16:14:26 GMT
From: "Kate Smalley" <Kate-Smalley@worldnet.att.net>
Subject: RE: Mailing List Perl Program?
Message-Id: <6cka52$8m9@bgtnsc01.worldnet.att.net>
Hi All!
I was wondering what was involved in setting up a mailing list perl
program? Is there a perl program available, with simple functions, not too
complicated? In your opinions is it too much trouble to bother with?
I would think the participants would number around 125 or so.
Thanks!
Kate
------------------------------
Date: 20 Feb 1998 10:10:12 -0500
From: Curtis Hrischuk <ceh@sce.carleton.ca>
Subject: Re: 5.004 bug? invisible object dereferencing
Message-Id: <wkd67mapb1n.fsf@suntan.sce.carleton.ca>
Yes, references do spring into existence but that has little to do
with my problem. In the example, the reference is a scalar value,
which is having a method called from its symbol table. Although perl
is powerful, scalars do not have a symbol table. This is similar to
trying to execute a method on an integer.
The code that works is:
print "mytime is " . $rap_time->stringize() . "\n"; # error!!
The good code should be:
print "mytime is " . $$rap_time->stringize() . "\n"; # note dereference
>> stringize()'s first argument is going to be a reference of type
>> AppTime.
Yes, but to get there requires dereferencing $rap_time from a scalar
to a package's symbol table to find the method call.
Help still.
Curtis
--
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ Curtis Hrischuk (PhD Cand) "in reality that comes from above _/
_/ ceh @ sce . carleton . ca God is calling _/
_/ Carleton University there's no bigger love _/
_/ Ottawa, On., Canada, K1S-5B6 It's his reality that welcomes us back_/
_/ Ph (613) 520-2600 x1762 Trust and obey _/
_/ FAX (613) 520-5727 there is no other way..." the newsboys_/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
------------------------------
Date: 20 Feb 1998 14:14:46 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Being Nice 2 Nice Beings [Was: Reading The FAQ's etc.: a teacher's perspective...]
Message-Id: <6ck34m$j7b@fridge.shore.net>
Bart Lateur (bart.mediamind@tornado.be) wrote:
: Why not create a censored version. Something like
: RT*M
Because people are more reactive to the original, me thinks.
--
Nathan V. Patwardhan
------------------------------
Date: 20 Feb 1998 14:31:22 GMT
From: "David Hall" <dhall@sportsline.com>
Subject: Re: Being Nice 2 Nice Beings [Was: Reading The FAQ's etc.: a teacher's perspective...]
Message-Id: <01bd3e0c$614e6820$41c900cf@dhall.sportsline.com>
OTOH, if you pronounce it "Read the FAQ 'n' Manual" (especially if you're
from Boston), you can both be more correct _and_ more informative <BG>
twod@not.valid wrote in article <6cjbas$ii9$1@vnetnews.value.net>...
> Everyone knows RTFM means 'Realtime Traffic Flow Measurement' but I fail
to
> see the significance .... :)
>
> I wish people would stop trying to rewrite history by changing the
expansion
> of the letter F. It is, and always has been, 'Fucking' - apologies to
those
> offended or shocked by the use of a word that is in most modern
dictionaries
> (of any repute) and could I suggest that they use the alternate 'RTCM'
(Read
> The Copulating Manual) acronym instead.
>
> The RTFM acronym has always been a put down to those who have not read
the
> documentation before attempting to do something and then asking a
question.
> Long may it remain so.
>
> IAP
>
------------------------------
Date: 20 Feb 1998 14:14:13 GMT
From: jack_h_ostroff@groton.pfizer.com (Jack Ostroff)
To: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Cucumber-type Question
Message-Id: <6ck33l$ii41@mascagni.pfizer.com>
In article <6cfrmk$kk0$6@comdyn.comdyn.com.au>,
mgjv@comdyn.com.au (Martien Verbruggen) writes:
> We talk about perl, and about the demise of this group. Oh, and some
> people talk about growing cucumbers.
Now this may be a real problem. If there have been posts about
cucumbers, my killfile has inappropriately trashed them. This is not
good. Can you provide a perl (or in this case should I say PERL?)
program to fix this? And if so, will it work under Win-X? :-)
Jack
jack_h_ostroff@groton.pfizer.com
------------------------------
Date: Fri, 20 Feb 1998 15:10:42 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: differences perl 4.0.1.8 -> 4.0.3.6
Message-Id: <EoonHu.7GI@world.std.com>
rhaig@austin.ibm.com (Haig) writes:
>I'm looking for historical information about updates to perl4
>(ver 4.0.1.8 -> 4.0.3.6) and the security & other implications
>thereof.
Most of the time, when confused people talked about "perl 4.0.1.8",
they really were dealing with "perl 4.036" The confusion arose because
they would see informtion like the following:
>This is perl, version 4.0
>
>$RCSfile: perl.c,v $$Revision: 4.0.1.8 $$Date: 1993/02/05 19:39:30 $
>Patch level: 36
>
>Copyright (c) 1989, 1990, 1991, Larry Wall
>
>Perl may be copied only under the terms of either the Artistic License or the
>GNU General Public License, which may be found in the Perl 4.0 source kit.
The RCS revision designation is not important, the important piece of
information is the "Patch level: 36"
>Also, I'd be interested in what would have to be done to any arbitrary
>perl4.0.1.8 script to make it run on perl5.
Have you seen the section in the "perltrap" man page that talks about perl4 to perl5 differences?
--
Andrew Langmead
------------------------------
Date: Tue, 17 Feb 1998 16:47:40 -0800
From: Craig Berry <cberry@cinenet.net>
To: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: FAQless Forays (was: Code Example Needed)
Message-Id: <Pine.GSO.3.95.980217164217.20695F-100000@hollywood.cinenet.net>
[courtesy cc of this posting sent to cited author via email]
On Tue, 17 Feb 1998, Tom Christiansen wrote:
> In comp.lang.perl.misc, cberry@cinenet.net (Craig Berry) writes:
> :Perl follows its normal rule -- using the number of list elements.
>
> There is no normal rule.
> There is no normal rule.
> There is no normal rule.
Ack, walked right into that one. OK, how about its 'usual' rule? 'Most
common' rule? 'One-I've-actually-used-most-often' rule? :) Seriously,
although it's utterly true that there's no universal rule for turning a
list into a scalar, using the element count does seem to be the 'default',
so to speak, in the absence of compelling reasons to do something else.
That's what I was trying to say before my brain and fingers got in the
way.
> But the scalar result of list assignment is the number of elements
> on the RHS:
>
> if ((($x, $y, $z) = fn()) > 3) {
> warn "extra retvals ignored";
> }
That's a nice little idiom. Consider it stolen. :)
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| Member of The HTML Writers Guild: http://www.hwg.org/
"Every man and every woman is a star."
------------------------------
Date: 20 Feb 1998 15:28:45 GMT
From: Tom.Grydeland@phys.uit.no (Tom Grydeland)
Subject: Re: FTP files without Net::FTP?
Message-Id: <slrn6er89d.5pv.Tom.Grydeland@mitra.phys.uit.no>
On Fri, 20 Feb 1998 14:36:33 +0100,
Power Tools Busines Services NV <ptbs@ping.be> wrote:
> I contacted my provider and then the
> problems occured. They only deliver the standard PERL package, and they
> don't allow us to use "perl Makefile.pm" to add new modules.
Install them in your own account.
> Yoeri Conickx
--
//Tom Grydeland <Tom.Grydeland@phys.uit.no>
------------------------------
Date: Fri, 20 Feb 1998 11:41:26 -0500
From: "john kelly" <john.kelly@citicorp.com>
Subject: Re: FTP files without Net::FTP?
Message-Id: <6ckbvi$n20$1@maple.cgin.us-md.citicorp.com>
Power Tools Busines Services NV wrote in message
<34ED86E0.D214F653@ping.be>...
>I want to FTP a few files via my perl script.
>
>I 've read the other articles in this newsgroup and I discovered the use
>of Net::FTP. I 've downloaded the modules and discovered that they
>might be very useful.
>Then I wanted to use them myself. I contacted my provider and then the
>problems occured. They only deliver the standard PERL package, and they
>don't allow us to use "perl Makefile.pm" to add new modules.
>
>Now I still want to ftp those files, is there another solution?
>
>Wouter Van Beneden
>Yoeri Conickx
>
>The PTBS team
>
Hi,
ON NT you can perform the following to create a child process that run
ftp.
print "INFO: starting transfer of file $file to $SYSTEM host\n";
$cmd= "sh -c \"echo \'user $USERNAME $PASSWORD \\nput $file \\nquit
\\n\'\"|ftp -n -v $MIS_TARGET_ip\n";
#transfer file and check completion status
open (FTP_PIPE, "$cmd |") || die "cant open pipe $! \n";
@strings2= <FTP_PIPE> ;
$string = join("", @strings2);
$string =~ s/\n//g;
if ( $string =~ /226 Transfer complete./ )
{
print "INFO: transfer completed; details follow\n\n",@strings2,"\n\n";
}
Hope this helps
John
------------------------------
Date: Fri, 20 Feb 1998 10:03:16 -0500
From: "Sylvain St.Germain" <sgermain@nortel.ca>
Subject: Re: Help for Hashes !!
Message-Id: <34ED9B33.5907EEB4@nortel.ca>
To do lookups I use the map function.
%UserExists = map {$_, 1}, keys %AssocArr;
$userid = "toto";
if ($UserExists{'userid'} == 1) {
....
Sylvain,
That's a FAQ of life.
Tod Thomas wrote:
> I have two ascii files both of which have a userid that I can use as a
> key. In two separate subroutines I load each of the files into an
> associative array with the userid as the key value. After loading each
> hash I then run a foreach loop getting the $key and $value from the
> first hash and then do a lookup in the second hash with $key - it
> doesn't work. I have tried using exist and it doesn't work either.
>
> Can I use the key valued with - foreach $userid (key %AssociativeArray)
> - to determine if an entry in another hash exists; like if
> (exists($AssociativeArray{$userid})) ?? If anybody has used a key from
> one hash to search another or can otherwise help I would really
> appreciate it.
>
> Thanks - Tod Thomas
------------------------------
Date: Thu, 19 Feb 1998 12:54:30 -0700
From: NerveGas <NerveGas@see_signature.com>
Subject: Re: HELP! My ISP claims that Perl access is a serious security risk!
Message-Id: <34EC8DF6.475B@see_signature.com>
My two bits...
> >> Do you guys really think the ISP in this case was
> >> over-the-top in requesting that those with access to the
> >> Perl interpreter (or other cool tools) pay attention to the
> >> security of their accounts? I'm of the opinion that
> >> everyone should be required to exercise some basic security
> >> procedures on their accounts, but that's probably out of the
> >> question.
I personally think that it is paranoia or lack of understanding on
your sysadmin's part. After running a web server with 3,000 users for
two years, we only had a problem once with a runaway program, and no
security problems. The things to watch out for are:
1. Make sure that your web server is *NOT* running as root, but as
something like "nobody", and that the "nobody" account belongs to a
"nobody" group, that does not have access to anything.
2. Have your sysadmin use something like CGIwrap, where your CGI
program runs as "you", not the web server. (Some web servers do this
automatically). If the above is used in conjunction with this, the only
files that your CGI can mess up (assuming all other decent
security/common sense practices are used by your sysadmin) are your
own. So, if your app goes haywire, it's your butt that's in a sling.
3. You (or your sysadmin) can also take precautions and limit the
amount of CPU time, memory, or other resources that your app can use.
That way, a runaway program won't eat up hundreds of megs of memory, and
bring the system to a crawl.
steve
--
----------------------------------------
Domain name for replying is "inconnect".
----------------------------------------
------------------------------
Date: Fri, 20 Feb 1998 15:19:51 GMT
From: perl.user@sndk.se
Subject: if (-d $filename) in Win32
Message-Id: <34ee9cff.25817503@news.rsv.rsv.se>
Why isn't the following ok in Win32? Is -d only working in unix perl?
I want to scan the whole of d:\ for perl-files (extension "pl").
#!/usr/bin/perl
@dirs =
(
'd:\\'
);
foreach $dir (@dirs)
{ # for each directory on d:\
opendir(HOMEDIR, $dir);
while (defined($filename = readdir(HOMEDIR)))
{ # for each file in this directory...
if ((-d $filename) and !($filename eq '.' or $filename eq '..'))
{ # this is a directory, let's scan it's files as well
push(@dirs, "$dir\\$filename");
}
elsif (-1 != index($filename, ".pl"))
{ # this is a perl file since it has ".pl" in it's name
print "Perlfile named \"$dir\\$filename\"\n";
}
}
closedir(HOMEDIR);
}
\\Staffan
------------------------------
Date: Fri, 20 Feb 1998 16:40:19 GMT
From: slocum@io.NOSPAM.com (Brett Slocum)
Subject: Re: Is perl and DBI good enough?
Message-Id: <34edacbd.606977773@news.io.com>
Let state here that I'm an object-oriented programmer with C++/Java.
I'm also a web developer in Java, VBScript and Perl. I'm pretty much
a generalist, utility programmer.
On Thu, 19 Feb 1998 17:23:44 +0100, Jonas Liljegren
<jonas@paranormal.o.se> wrote:
>The goal is to have a development tool there you realy fast can put
>together different components. The components shold work together
>without
>side effects. New programmers have to be able to quickly understand a
>single component to make modifications.
This can be accomplished with both Java and Perl. The OO nature of
Java is rather stronger than Perl's, so developing components without
side effects is somewhat easier in Java. Both are about as easy to
understand.
>1. Java forces you to make structured programs. You don't have to invent
>a
>programming structure. The controls ar built in to the language.
This won't help bad programmers make good programs. Nothing will.
>2. Java has many development tools. Drag'n drop programming interfaces.
>Meta-tools for object-oriented programming, documentation, version
>control
>etc. The graphical interface makes it somwhat easier to use without
>having
>to learn the details about it.
GUI IDEs make it easier for someone who doesn't know what they are
doing to write code that doesn't work. I can be as productive in Perl
in 'vi' as with Java in a nice GUI envirnonment. It's just a little
nicer.
>3. I don't get it, but they din't seem to be impressed of CPAN, the perl
>community or the Perl Clinic. Like: "We can't depond on the free support
>fromhighschool students that wrote cool perl modules. We will get in the
>situation there we can't get help just becuse the programmer student has
>a
>paper to do."
High school students, seasoned professionals, devoted hobbyists. And
if the author can't help, then there are thousands of others willing
to step up and help. You won't find that in the commercial compiler
companies. I've had huge problems getting M$, Sun, Oracle and other
commercial companies to respond to problems, let alone do anything
about them. Once they finally admit that something might be wrong
with their product (only happened twice in 20 years of programming),
the most common response has been "It will be fixed by the next
release in a year". Wow, what response time!
> And the rule out the Perl Clinic because it doesn't sound
>serious enough. Six-packs and "money back" is not the type of support we
>seeks. We want dedicated professional programmers, tied with support
>contracts on a per year basis. The Perl clinic seems more like a hacker
>support for isolated fixes.
I've never used the Perl Clinic, but support contracts are a great way
for software companies to make butt-loads of money without actually
having to perform work. Many times I've seen little movement from
companies, even though we had 'Platinum Super Deluxe' level support
costing more than the original product cost.
Many of the people who offer support for Perl *are* 'dedicated
professional programmers'.
>We can't use modules at CPAN just like that. What kind of quality
>control has they gone through? Many of the DBD modules seems to be in
>alpha or beta stage. The price of the modules isn't an issue. The
>fact
>that the modules doesn't cost anything is not a plus, but their
>shifting
>quality is a minus. :-(
I've found Alpha versions in CPAN to be more bug free than most
bug-fixed releases of commercial software. DBI specifically has given
me absolutely no problems. OTOH, Microsoft Office 97 (after adding 2
service packs) has given me more problems than any other piece of
software I've ever used.
>4. The future. Is it better to take every chanse to build competence
>in
>java? There seems to be more java programmers availibel than perl
>programmers. At least in my company.
This is a legitimate problem. Ramp up time in learning a new language
could suck a week or two from your schedule at the beginning.
>The answers on this list tells me that there has been big projects with
>perl dbi. But is this the normal case? Maby most projects has been
>developed in C++ or other languages?
It all depends on what you want. More client-server GUI programs have
been written in C++ than either Java or Perl. More web server and
administrative programs have been written in Perl than any other
language.
>I would realy like a remedy for the points above. All you who has
>developed big programs: how do you structure the components to eliminate
>mistakes and enable fast development?
One consideration not mentioned in all this is that Java is still a
developing language. Though it is more stable than a year ago, it
still has elements that are in beta-test: Swing, etc. Perl is
currently more stable in terms of the language than Java is.
Brett Slocum, slocum AT io DOT com, unSPAM address to reply
http://www.io.com/~slocum/
Tekumel Home Page: www.io.com/~slocum/tekumel.html
GURPS Home Page: www.io.com/~slocum/gurps.html
------------------------------
Date: Fri, 20 Feb 1998 13:57:45 GMT
From: xvs-RemoveThisFirst-@yahoo.com
Subject: JOB: Hotshot Perl Programmer wanted
Message-Id: <34ed8a98.46637996@news2.ibm.net>
We are looking for a hotshot Unix/Perl programmer for a project
starting ASAP, and running through April. More projects are in the
pipeline as well.
Work can be done offsite (for example, if you live in Timbuktu), or
onsite (in San Francisco near South Park).
Do you:
- design simple, elegant ways to perform required tasks?
- write beautiful, clear, readable code?
- enjoy making everything modular?
- like experimenting with all the Perl modules just for fun?
- think ahead and write code that handles various possible error
conditions?
- have experience writing large systems?
- know other languages, such as c++ or Java?
Are you:
- available for at least 20 hours per week for the next 2 months?
If so, please send a resume and salery requirements to
xvs-RemoveThisFirst-@yahoo.com, and we'll take it from there. Contract
and Permanent (incl stock options) are both possible.
Development is in the Solaris environment. Deployment is on multiple
platforms. Experience with SQL databases, installation scripts, and
Perl under NT are all plusses.
*****************************
I DO NOT want unsolicited e-mail & I will bill you for it.
By US Code Title 47, Sec. 227(a)(2)(B), a computer/modem/printer meets the
definition of a telephone fax machine. By Sec.227(b)(1)(C), it is unlawful to
send any unsolicited advertisements to such equipment, punishable by action
to recover actual monetary loss, or $500, whichever is greater, for each
violation.
Pursuent to US Code, Title 47, Chapters 5, Subchapter II, Sec. 227, any and
all non-solicitied commercial e-mail sent to this address is subject to a
download & archival fee of $500 US.
E-mailing denotes acceptance of these terms.
*****************************
------------------------------
Date: 20 Feb 1998 11:31:00 -0500
From: Paul Joslin <paul.joslin@sdrc.com>
Subject: lwp-mirror: at vs cron
Message-Id: <y4du39ufdbv.fsf@sdrc.com>
Apologies in advance if there isn't enough perl in this to interest you...
I have a shell script which uses lwp-mirror to fetch a page, and then process
it. The script runs correctly from the command line, and from at or batch,
but not from cron. The error message is "lwp-mirror: 501 Not Implemented".
Env problem, right? Especially since I'm behind a firewall and have to
specify proxies via variables...
If I save the environment from the command line (env | perl -pe
's/^(.*)=(.*)$/$1="$2"/gio' > FILE), and dot the file into the script, it
still doesn't work from cron.
What am I overlooking?
--
Paul R. Joslin paul.joslin@sdrc.com +1 513 576 2012
Paul R. Joslin paul.joslin@sdrc.com +1 513 576 2012
What about WRITING it first and rationalizing it afterwards? :-)
--Larry Wall in <8162@jpl-devvax.JPL.NASA.GOV>
------------------------------
Date: 20 Feb 1998 14:18:09 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: My first perl program, yippee!
Message-Id: <6ck3b1$j7b@fridge.shore.net>
Matthew Pryor (matt.pryor@dial.pipex.com) wrote:
: I've just finished my first full perl
: script, and would now like to
: show it off, coz I'm proud of my
[snip]
You couldn't have been *that* proud to show it off as I needed the
Rosetta Stone to convert it. And yes, this is a bad thing.
--
Nathan V. Patwardhan
------------------------------
Date: 20 Feb 1998 16:30:29 GMT
From: Seth Holcomb <seth@e-zcomputers.com>
Subject: NEWBIE: .=
Message-Id: <34EDAF79.E0570CA@e-zcomputers.com>
Just started with Perl 5 for Dummies. I've examined several working
scripts (3-11 pages) and understand it all perfectly... almost.
The book doesn't explain well what .= does; it just compares to +=.
I am guessing this concatinates strings. Am I close?
Thanks
--Seth
------------------------------
Date: Fri, 20 Feb 1998 15:05:15 +0100
From: Thomas Johansson <thomas.johansson@unisource.se>
Subject: Out of memory
Message-Id: <34ED8D9B.30B4DDDE@unisource.se>
Processing BIG ascii-files, 300 - 500 MB and 400 - 800 000 records each.
Simple sequential read/write operations.
The Perl-script crashes round record nr 640 000 with 'out of memory'.
Solaris 2.5.1, 512MB memory and 2 GB swap.
Anyone know why and how to get around it?
Thomas
------------------------------
Date: 20 Feb 1998 15:36:22 GMT
From: jack_h_ostroff@groton.pfizer.com (Jack Ostroff)
To: Geert Roovers <Geert.Roovers@POBoxes.com>
Subject: Re: Perl 4/5 - Part 2
Message-Id: <6ck7tm$ii42@mascagni.pfizer.com>
In article <34ED79F4.2ACA@POBoxes.com>, Geert Roovers <Geert.Roovers@POBoxes.com> writes:
> Hi.
>
> What facts can I use to make my system manager upgrade to Perl 5?
>
> Greetings
>
> Geert Roovers
This has been covered many times here recently, so a DejaNews
search would probably be useful.
There seem to be two major arguments to use:
- There will not be any efforts to make Perl4 Y2K compliant
- Perl4 has lots of security problems
In addition, because it is unsupported, you are unlikely to
get any type of help with problems and few, if any, of the
newer modules on CPAN are likely to work with Perl4.
Good luck
Jack
jack_h_ostroff@groton.pfizer.com
------------------------------
Date: 20 Feb 1998 10:20:19 -0500
From: charlot@CAM.ORG (Richard Bellavance)
Subject: Re: Perl 4/5
Message-Id: <6ck6vj$447@stratus.CAM.ORG>
In article <34ED68D5.129E@POBoxes.com>,
Geert Roovers <Geert.Roovers@POBoxes.com> wrote:
>Hi All!
>
>I'm making my first steps on the Perl path, and sofar, I have one major
>problem. I can only find books teaching me Perl 5, but my system manager
>has only Perl 4 installed, and won't install the newest version. And I
>think there is where some of my problems are.
>
Have you tried telling you system manager (or his boss) that Perl 4 is not
year 2000 compliant, and that there are no plans to make it so ?
Richard.
--
Richard Bellavance -- charlot@cam.org -- http://www.cam.org/~charlot/
"All along this path I tread / My heart betrays my weary head
With nothing but my love to save / From the cradle to the grave"
(Eric Clapton, "From the cradle")
------------------------------
Date: Fri, 20 Feb 1998 11:44:34 -0500
From: "john kelly" <john.kelly@citicorp.com>
Subject: Re: Perl/sendmail file attatchment
Message-Id: <6ckc5e$n4o$1@maple.cgin.us-md.citicorp.com>
uuencode your file and concatenate it to your text.
Robert Barker wrote in message <34ED805F.96617C1A@net7.co.uk>...
>Can u attatch files with sendmail???
>
>I want the user to select a file from a html pulldown menu, fill in
>their
>email address and have the file sent back to them.
>
>Must be possible (and probably quite simple).
>
>Thanks
>
>
>
>--
>Robert Barker
>System's Development Manager
>Net7 Limited
>http://www.net7.co.uk/
>
>Tel: +44 (0)1924 444007
>Fax: +44 (0)1924 445507
>
>dataTRAK - Net7's Java Meta-Search Engine:
>http://datatrak.net7.co.uk
>
>
------------------------------
Date: Fri, 20 Feb 1998 15:25:37 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Perldebugger for Windows
Message-Id: <Eooo6p.Fuy@world.std.com>
Weisshaupt & Partner AG <wpwerbung@active.ch> writes:
>I'm looking for a Perldebugger running under Windows 95 or NT.
>Does somebody know where I can get one?
Perl has a debugger included with it. It is accessed by giving perl
the "-d" flag.
Documentation is available in the perldebug man page.
You may be offput about the primitiveness of its command line
interface, but if you spend any time with it you may eventually become
impressed with its power and flexibility. And since the debugger
itself is written in perl, as your experience with perl grows, the
capabilties of the debugger will increase as well.
--
Andrew Langmead
------------------------------
Date: Fri, 20 Feb 1998 09:55:17 -0500
From: Bob Trieger <corky@ultranet.com>
To: Sergio Brandano <serbr@tin.it>
Subject: Re: printing problem
Message-Id: <34ED9955.1E73@ultranet.com>
Sergio Brandano wrote:
>
> > [courtesy cc of this posting sent to cited author via email]
> >
> > serbr@tin.it said...
> > : I would like to save in a postscript file an html page
> >
> > http://wwitch.unl.edu/htmlconv.html
> >
> > Please note that your question is not related to the Perl language. Note also
> > that you'd have found the URL above if you'd done what I just did, which was
> > to use a web search engine.
>
> > # Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
>
> Many thanks for Your courtesy, but You are very wrong in judging my message.
>
> My question is not at all "off topic", in fact my question is about perl and
> CGI,
> and involves also html and postscript. I do not need an html2ps converter,
> while
> I need an CGI command for printing on file instead of the browser.
>
> Note that if my message is "off topic" for this list, itself CGI should be
> "off topic" as well.
>
CGI is off-topic in comp.lang.perl.misc!!!
try comp.infosystems.www.authoring.cgi
HTH
Bob Trieger
corky@ultranet.com
PS. You may want to take a look at the line-wrap in your newsreader.
------------------------------
Date: Fri, 20 Feb 1998 16:07:58 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: printing problem
Message-Id: <Eooq5A.9rL@world.std.com>
Sergio Brandano <serbr@tin.it> writes:
> My question is not at all "off topic", in fact my question is about perl and
>CGI,
> and involves also html and postscript. I do not need an html2ps converter,
>while
> I need an CGI command for printing on file instead of the browser.
> Note that if my message is "off topic" for this list, itself CGI should be
> "off topic" as well.
They often are. Look at this way:
The CGI protocol defines a method of supplying input to a program, and
a defines a method in which a program should format its
output. Anything that deals with these issues are off-topic, since
they are the same no matter which language your script is implemented
in. If the CGI protocol has a method of telling the browser that
initiated the transaction to run the printer, then it would be the
same regardless of which language is used to write the script.
If the input and the output are being taken care of correctly, and if
the script itself is written in perl, it has the potential of being
on-topic, but not necessarily.
Lets say there is a MIME type that specifies the output should not be
displayed on the screen, but should be printed on the printer. Lets
say it is "text/hardcopy". In perl, you would say:
print "Content-Type: text/hardcopy\015\012\015\012";
In C you would say:
printf("Content-Type: text/hardcopy\015\012\015\012");
In PostScript, you would say something like:
(Content-Type: text/hardcopy\n\n) print
(I'm not sure how you represent literal byte patterns in postscript,
so I represented then as platform dependent newlines instead.)
Unless you are having problems with the print() function, the problem
is not a perl problem.
--
Andrew Langmead
------------------------------
Date: Fri, 20 Feb 1998 14:48:28 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Problem with pack() -- really print() adding CR in NT.
Message-Id: <EooMGs.4Js@world.std.com>
David Watson <standfast@mindspring.com> writes:
>It isn't the pack(), it's the "print" that's writing the results to the
>output file.
>How interesting! Print has prepended a '0D' or carriage return to every
>'0A' or line feed that it puts out.
>Obviously I will go work around that now.
I hope you are planning on working around it by setting the filehandle
to binary mode with the "binmode()" function. Since the system has a
different notion of "text" and "binary" files, perl has to treat
different filehandles appropriately. So filehandles default to text
mode, until set to binary mode with this function.
--
Andrew Langmead
------------------------------
Date: Fri, 20 Feb 1998 13:37:45 GMT
From: drummj@mail.mmc.org (Jeffrey Drumm)
Subject: Re: Problem with pack() -- really print() adding CR in NT.
Message-Id: <34ed7f98.42207407@news.mmc.org>
On Thu, 19 Feb 1998 23:47:01 -0800, David Watson <standfast@mindspring.com>
wrote:
>OK, following up my own posting I see more about what's happening.
>
>It isn't the pack(), it's the "print" that's writing the results to the
>output file.
>
>How interesting! Print has prepended a '0D' or carriage return to every
>'0A' or line feed that it puts out.
>
>Obviously I will go work around that now.
>
>It worked fine on Unix, but I imagine print wasn't really intended for
>writing random binary data, so here in the CRLF world, it works
>differently. Hmm.
>
Yep, and that's EXACTLY the sort of thing binmode() is for. In the Unix
world, Perl is binary clean, but it's efforts to make things a little
easier for the PoB (where I am, as someone else here puts it, in the
Minimum Security Wing, doing most of my stuff on a sort of "work-release
program") occasionally trips up the fresh meat[1].
Just call binmode() on the file handle to which you're printing.
[1] At least you still get to wear your own clothes . . .
--
Jeffrey R. Drumm, Systems Integration Specialist
Maine Medical Center Information Services
420 Cumberland Ave, Portland, ME 04101
drummj@mail.mmc.org
------------------------------
Date: Fri, 20 Feb 1998 14:43:31 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Problem with pack() in perl 5.004_04?
Message-Id: <EooM8K.GuI@world.std.com>
David Watson <standfast@mindspring.com> writes:
>The line from the code I'm porting is:
>$Header[13+$i*3] = pack("N",$RecordLocalID[$i]);
>This is in a loop run about 150 times. Starting around the 10th time,
>the pack seems to set $Header[foo] to 5 bytes worth of stuff... but not
>every time. arrgh.
What is the value of $RecordLocalID[$i] that when packed with the "N"
template returns 5 bytes? Maybe you could rearrange your code a little:
{
my $temp = pack 'N', $RecordLocalID[$i];
$Header[13+$i*3] = $temp;
}
and in the debugger set a conditional breakpoint when length($temp) != 4.
The only input to pack is the template and the list of scalars that
follows it. So given a particular set of inputs, it is guaranteed to
return the exact same outputs. Find out which input is causing the
incorrect output, and file a bug report when find it.
--
Andrew Langmead
------------------------------
Date: 20 Feb 1998 14:53:03 GMT
From: Richard Palmer <rdp@spike.palmer.com>
Subject: Problems with perl embedded in inn
Message-Id: <6ck5cf$t53$1@spike.palmer.com>
Keywords: perl,inn
I recompiled inn-1.7.2 (with many patches) linking in
perl 5.004_04 instead of perl 5.004_01 and now innd crashes
on attempting to initialize perl. Before I try to hunt this
down, I thought I would check and see if anyone has already
solved this problem.
------------------------------
Date: 20 Feb 1998 15:07:59 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: RFC about ``Matt's Script Archive''
Message-Id: <6ck68f$ckt$1@lyra.csx.cam.ac.uk>
Russ Allbery <rra@stanford.edu> wrote:
>
>I code require 5.004 quite a bit because I want the features that 5.004
>offers. It's available for Windows, and is dramatically better and more
>stable than 5.003 (let alone 4).
And more importantly, all versions of Perl before 5.004 have serious
security loopholes.
Mike Guy
------------------------------
Date: Fri, 20 Feb 1998 15:38:36 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Secure Path with setgid
Message-Id: <EooosC.M05@world.std.com>
"Wilbur R. Johnson" <wrjohns@sandia.gov> writes:
>How can I get perl to accept a nonstandard path as "Secure"?
I think you are misinterpreting the error message that perl
reports. have you seen the more detailed explaination in the perldiag
man page? <URL:http://www.perl.com/CPAN/doc/manual/html/pod/perldiag.html>
Have you read the perlsec man page about the security implications of
setgid scripts and the dataflow checking that perl does to attempt to
point out potential problems? <URL:http://www.perl.com/CPAN/doc/manual/
html/pod/perlsec.html>
Perl does not have any notion of a standard or non-standard path. The
only things it cares about is:
1. The path did not come from any outside input and can be
trusted. This means that it will not trust the PATH environment
variable that it got when it was started. The easiest solution is to
set your own within the program itself.
2. That none of the directories in the PATH environment variable are
world writable.
It ensures that this is true, even if you specify a full path when you
call another program in your perl script. After all, perl doesn't know
what other programs they may be calling.
--
Andrew Langmead
------------------------------
Date: 20 Feb 1998 10:23:24 -0500
From: Diego Zamboni <zamboni@cs.purdue.edu>
Subject: Subroutine closing STDIN
Message-Id: <fwbtw2qp03.fsf@narnia.cs.purdue.edu>
Hi,
I'm attaching a short piece of perl code that shows the problem I'm having.
The subroutine takes a IO::Select object as an argument, and waits for
input to be available for reading on any of the handles contained in it,
and returns the first line read. If STDIN is not in the select object, it
adds it. This part works ok.
However, if no argument is provided, I want to create a temporary select
object, add STDIN to it, and wait for input to be available. The problem
is that apparently, upon exit, when the temporary select object is
destroyed, all the handles it contains are destroyed, and apparently
automatically closed. The next call fails with a STDIN close, the program
ends, and whatever I typed ends up as if I had typed it in my shell.
I have tried doing $select->remove(\*STDIN) before exiting the function,
but apparently that also closes the handle.
Any ideas of how to work around this will be greatly appreciated.
Thanks,
--Diego
---- Program follows ----
#!/p/perl/perl
use IO::Select;
use IO::Handle;
sub readSelect {
my $select=shift;
# Create a temporary select object if none provided.
$select=IO::Select->new, warn "Creating temporary select\n" unless $select;
$select->add(IO::Handle->new_from_fd(fileno STDIN, "r")),
warn "Adding STDIN to the select object\n"
unless $select->exists(\*STDIN);;
@ready=$select->can_read;
foreach $fh (@ready) {
$msg=$fh->getline;
return $msg;
}
}
$s=IO::Select->new;
# These two work ok.
print readSelect($s);
print readSelect($s);
# In these, the second fails, as if STDIN is closed.
print readSelect;
print readSelect;
# Sample run:
# % perl testSTDINclose.pl
# Adding STDIN to the select object
# blabla <--- my input
# blabla <--- program output
# <-- Notice that the "Adding..." message is not shown again, because
# <-- STDIN is already in the $s object.
# bleble <--- my input
# bleble <--- program output
# Creating temporary select
# Adding STDIN to the select object
# blabla <--- my input
# blabla <--- program output
# Creating temporary select
# Adding STDIN to the select object
# bleble <--- my input...
# % bleble <-- ends up in the shell
# bleble: Command not found.
# %
------------------------------
Date: 20 Feb 1998 14:06:49 GMT
From: pkasieck@cognex.cognex.com (Philip T. Kasiecki)
Subject: Re: Year 10000 Compliance
Message-Id: <6ck2lp$45v$2@cognex.cognex.com>
In article <6cittf$h3c@news.hemi.com>,
Ade Barkah (mbarkah@hemi.com) wrote:
: Colin Dooley (colin@medit3d.com) wrote:
: : I'm looking forward to the year 10000 problem with interest.
: Most computers today wont be able to work past the year 2038
: (time_t overflows,) so lets fix that first. ;-)
In addition, there's more time to worry about 10000, and now that the
cost of memory (a big contributor to this even happening) is a tiny drop in
the bucket from what it was, software developers should learn from this. I
also think that if any Y2K solution has long-term potential, it's expanding
to a four-digit year field, and I would surmise that moving to a five-digit
field one day would not pose a huge problem. But there's also the problem
of date data types- the reason why even with exapnding to a four-digit year
field, most dates are only good for about another 2600 years.
Phil Kasiecki
--
Philip T. Kasiecki
Hardware Co-op, Cognex Corporation
(508) 650-3308
pkasieck@cognex.com
http://lynx.dac.neu.edu/home/httpd/p/pkasieck/
------------------------------
Date: Fri, 20 Feb 1998 15:53:11 GMT
From: mkeesan@kenan.com (Morris M. Keesan)
Subject: Re: Year 10000 Compliance
Message-Id: <34eda333.264382031@news>
On Fri, 20 Feb 1998 00:45:36 +0100, Colin Dooley <colin@medit3d.com>
wrote:
>I'm looking forward to the year 10000 problem with interest.
>
>
>Everybody is spending billions converting their software to use
>four digit dates, and they're gonna have to do it all over again
>in the year 9999....
>
>
>
>Don't laugh! Jewish and Chinese computers must be nearing this
>deadline already...
It depends on your definition of "nearing". Jewish computers are in the
year 5758 right now, which gives us more than 4000 years before we need
to start worrying about Y10K, and the Chinese lunar calendar is behind
us, in 4696 (which raises the question of where my people went out to
eat on Christmas Day, for the first 1062 years).
Japanese computers are likely to be in for a shock when human life
expectancy reaches the point where an emperor's reign can last a century
or more; the current year in the traditional Japanese system is
Heisei 10.
--
Morris M. Keesan -- mkeesan@kenan.com
Kenan Systems Corporation
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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 V8 Issue 1941
**************************************