[9650] in Perl-Users-Digest
Perl-Users Digest, Issue: 3245 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jul 24 12:07:49 1998
Date: Fri, 24 Jul 98 09:01:33 -0700
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, 24 Jul 1998 Volume: 8 Number: 3245
Today's topics:
Perl scripting on IIS NT box (Clint King)
Re: Perl scripting on IIS NT box <joneil@cks.ssd.k12.wa.us>
Re: perlfaq (Bob Trieger)
POSIX.pm - where? <matthew.wood@bbc.co.uk>
Re: Problem with 'use strict' pragma <jdporter@min.net>
Re: Reading Landmark Data in Perl (Will Morse)
replacing characters with other characters, using regex (Bjorn Malmberg)
Re: Server Side Includes <rkim@temple.edu>
Re: spss file format <earlw@kodak.com>
Re: subs in separate files? <jdporter@min.net>
Re: subs in separate files? (Bart Lateur)
Re: Text processing question <quednauf@nortel.co.uk>
URGENT: Perl 5 and Multiple Processor UNIX Box Problems <george.kuetemeyer@mail.tju.edu>
Re: Why can't I "require" a file? (Larry Rosler)
Re: Win NT Perl 5.0 Y2K compliance <rurban@sbox.tu-graz.ac.at>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 24 Jul 1998 09:53:17 -0400
From: gt4729d@prism.gatech.edu (Clint King)
Subject: Perl scripting on IIS NT box
Message-Id: <6pa3kd$ol8@acmey.gatech.edu>
Hello!
I am setting up a web page on an NT box running MS-IIS.
I have installed Perl for Win32 (Activestate I think)
and have the perliis.dll
But I can't seem to get my perl scripts to run correctly.
I even added the .pl extension to the registry as suggested
and it still doesn't work.
I haven't done perl on the web before and am having some trouble
any suggestions???
ck
--
Clint King | gniK tnilC
Georgia Institute of Technology | ygolonhceT fo etutitsnI aigroeG
Discrete Mathematics Major | rojaM scitamehtaM etercsiD
gt4729d@prism.gatech.edu | ude.hcetag.msirp@d9274tg
------------------------------
Date: Fri, 24 Jul 1998 08:28:56 -0700
From: Jerome O'Neil <joneil@cks.ssd.k12.wa.us>
To: Clint King <gt4729d@prism.gatech.edu>
Subject: Re: Perl scripting on IIS NT box
Message-Id: <35B8A838.160D453C@cks.ssd.k12.wa.us>
Clint King wrote:
> I haven't done perl on the web before and am having some trouble
> any suggestions???
You have a server configuration problem. Consult the documentation that
came with it, contact the manufacturer, or ask in one of the
comp.infosystems.www.server groups, where they have many experts on that
kind of thing.
Good Luck!
Jerome O'Neil
Seattle Public Schools
Information Services
------------------------------
Date: Fri, 24 Jul 1998 15:33:50 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: perlfaq
Message-Id: <6pa9lo$t7t$2@strato.ultra.net>
[ posted and mailed ]
"gpsingh@mailcity.com" <gpsingh@mailcity.com> wrote:
-> Hey,
Hay is for horses and it makes me fart.
-> Where can i get perlfaq4/5 , perldoc information.
If you have perl installed on your system, you have the documentation
including the faqs. If you lost it somehow, you can find it at
http://www.perl.com/
Bob Trieger
sowmaster@juicepigs.com
" Cost a spammer some cash: Call 1-800-400-1972
Ext: 1949 and let the jerk that answers know
that his toll free number was sent as spam. "
------------------------------
Date: Fri, 24 Jul 1998 14:57:27 +0100
From: "matt wood" <matthew.wood@bbc.co.uk>
Subject: POSIX.pm - where?
Message-Id: <6pa3s8$srs@bbcnews.rd.bbc.co.uk>
None of my installs of perl (win32, solaris, rhapsody) seem to feature the
POSIX.pm module.
I've looked in CPAN and found a 'POSIX.pm' file, but I'm guessing there's
more to installing it than just slapping it into @INC...?
Any hints would be appreciated...
|| Matthew Wood, development lead, BBC News Online
|| http://www.bbc.co.uk/news
|| matthew.wood@bbc.co.uk
------------------------------
Date: Fri, 24 Jul 1998 14:58:48 GMT
From: John Porter <jdporter@min.net>
Subject: Re: Problem with 'use strict' pragma
Message-Id: <35B8A2B4.438A@min.net>
Stephan Carydakis wrote:
>
> They copied vars.pm over to the server that my cutomers site lives on
> from another installation of the same version of Perl(they reckon!!!).
> OK... that error dissapeared. But now I'm getting quite a few "global
> symbol some_variable requires explicit package name" errors in my
> script, even though I'm qualifying my variables with the 'use vars'
> pragma.
>...
> So far as I understand, the 'use vars' pragma should qualify my
> variables with an explicit package name? The script runs fine on my
> PC(winblows 95). If someone can enlighten me as to what is going on, I
> would appreciate it greatly.
Sounds to me like they gave you a bogus vars.pm which doesn't actually
do anything! Have you actually looked at your vars.pm?
--
John Porter
------------------------------
Date: Fri, 24 Jul 1998 14:13:13 GMT
From: wtm001@anadarko.com (Will Morse)
Subject: Re: Reading Landmark Data in Perl
Message-Id: <EwLrI7.MrC@anadarko.com>
Stephen,
There is not a Landmark newsgroup - the
population would be too small - but there
is sci.geo.petroleum, which does address
this sort of issue from time to time and
it is well within the charter.
The format for these files is proprietary,
so you technically should get the
information from Landmark. I presume you
are meaning SeisWorks 2D files, Landmark
(Landmark Graphics Corporation) also has
Geographix and ProMAX and other products
that deal with 2D seismic and not always
in SeisWorks format. By the way,
there is also an unrelated Landmark Systems
Corporation that is probably better
known outside the oil patch than LGC.
You could, of course, run a bcm2d job to
extract the data to an SEG-Y file and
then read that. The SEG-Y format is
fairly well known and available. I
can get you that information or it is
probably easiest to down load Seismic
Unix from The Center for Wave Phenomonen
at Colorado School of Mines.
To reverse engineer the file format
(consult your license agreement to see
your rights regarding this) the easiest
way is to use od - the octal debugger.
Look for patterns you would know, such
as XY coordinates.
Hope this helps.
Will
Stephen Palmer (slpalmer@flex.net) wrote:
: I'm writing a script to create a database of 2d seismic base lines. The
: files were created with Landmark. Does anyone know the data structure
: used in these (binary) files? I'm trying to extract the xy coords from
: these files...
: I've looked for, but can't find a landmark newsgroup,.
: Thanks!
: ---
: Stephen L. Palmer
: Email aistslp@sugarland.se76.com
: Email slpalmer@sprintparanet.com
: Pager (800)724-3329 or slpalmer@pager.sprintparanet.com
: PIN 382-1266 (Short msgs please)
--
Will Morse | This is a statement of opinion
| even if stated as a fact.
Gravity |
Not just a good idea | Copyright 1998, Will Morse
It's the law | Okay to quote/archive on internet.
| Newsmedia quoting requires permission.
------------------------------
Date: Fri, 24 Jul 1998 15:09:24 GMT
From: news@NOSPAM.gb-design.com (Bjorn Malmberg)
Subject: replacing characters with other characters, using regexp
Message-Id: <35b8a265.11105378@news.algonet.se>
Hiya ppl,
I'm sorry if this Q already has been asked here, but I couldn't find
any articles about this....
I have a cgi script that takes a cookie from the client, the problem
is that Swedish characters such as e d and v (a with dots over it, and
o with dots over...) become really funny characters in the output...
Now I want to replace those funny characters with the right characters
again, after getting the cookie.
It's really easy to replace a word.... that's only to do this:
$name =~ s/word/replaceWord/g;
This thing is a bit harder since it's not only one word, it's more....
and I have to search for the funny characters and replace them ..
Anyone know how to do this??
TIA
Bj0rN
------------------------------
Date: Fri, 24 Jul 1998 11:00:50 -0400
From: Richard Kim <rkim@temple.edu>
Subject: Re: Server Side Includes
Message-Id: <Pine.OSF.3.91.980724105959.16340B-100000@thunder.ocis.temple.edu>
I think what your administrator meant was that the file extension on the
HTML page should be .shtml.
hope this helps,
Rich
[5;1m rkim@temple.edu [0m
On Fri, 24 Jul 1998, Hector Catre wrote:
> I'm having trouble activating a server side include
>
> My server administrator said that only file extensions with .shtml will be
> parsed, which lead to the following line:
>
> <!--#exec cgi="/cgi-bin/test.shtml"-->
>
> instead of :
>
> <!--#exec cgi="/cgi-bin/test.cgi"-->
>
> but this doesn't work.
>
> What the hech if the differance when they say that only .shtml files will be
> parsed?
>
> Hector Catre
> hector@followme.com
>
>
------------------------------
Date: Fri, 24 Jul 1998 10:24:17 -0400
From: Earl Westerlund <earlw@kodak.com>
Subject: Re: spss file format
Message-Id: <35B89911.2BD4@kodak.com>
S.R.M. Walsh wrote:
>
> I am a computer science student at the University of Liverpool (U.K)
> and I am currently engaged in a project involving spss.
> I have created web pages that include an online form which is then
> processed by a cgi program (written in Perl5). The data is saved in
> files using name=value,(value),etc.. pairs. I now wish to write another
> perl program that will read in each of these files and convert them into
> spss files. However I do not know what has to be included in these
> files and the exact syntax of the contents. I would be very grateful if
> anyone can point me to relevant sources of information.
Have you tried news:comp.soft-sys.spss?
--
+-----------------+----------------------------------------+
| Earl Westerlund | Kodak's Homepage: http://www.kodak.com |
+-----------------+----------------------------------------+
| The opinions expressed herein are mine and mine alone |
| (most people don't seem to want them anyway) |
+----------------------------------------------------------+
------------------------------
Date: Fri, 24 Jul 1998 14:34:45 GMT
From: John Porter <jdporter@min.net>
Subject: Re: subs in separate files?
Message-Id: <35B89D10.6452@min.net>
Quinn,M wrote:
>
> Novice question:
> How do I put subrouotines (functions) into
> separate files?
> I've tried "use", "require", etc. No luck.
> If anyone can refer me to pages in "Learning Perl" or
> "Programming Perl" or on-line Perl documentation,
> I'd be grateful.
You have "Programming Perl"? What about the entry
for require (p. 205) do you find confusing?
What errors did you get when you tried to use require?
--
John Porter
------------------------------
Date: Fri, 24 Jul 1998 15:48:52 GMT
From: bart.mediamind@tornado.be (Bart Lateur)
Subject: Re: subs in separate files?
Message-Id: <35b9ac52.29378064@news.tornado.be>
Quinn,M wrote:
>How do I put subrouotines (functions) into
>separate files?
Look up "require". Put the sub in a separate file, end it with a "true"
value ("1;" is pretty popular), require it in your main script. You can
then use the subs as if defined locally.
The nice thing about require, is that you can include code to initialize
the data structures once. Require it again, and it won't be
reinitialized. I hope that's not too vague... :-)
Bart.
------------------------------
Date: Fri, 24 Jul 1998 14:25:28 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: Text processing question
Message-Id: <35B88B48.349C2A26@nortel.co.uk>
Eric Williams wrote:
>
> Hello,
>
> I have lots of different ascii files with columns of data that aren't
> necessarily formatted the same from file to file. Also some of the
> columns have a blank (whitespace) entries occassionally.
Well, not much one can suggest then. If the values are, say, tab
delimited you could split() each line on tabs. Then you can check every
entry for whitespaces, and if there are, replace them with the value you
want to use...
For an inspiration on how I would go about that, check this snippet:
@to_use = qw / 0.045 0.037 0.023 /;
while (<DATA>) {
chomp;
push @file, line($_);
}
sub line {
my @line = split /\t/, +shift;
@line = map { length $_ ? $_ : shift @to_use } @line;
return \@line;
}
for (@file) {
print join("\t", @$_),"\n";
}
__DATA__
45676.3671 7.058 0.087 0.128 0.194 1,B
45944.4704 7.076 0.089 0.100 0.177 3,M
45945.4773 7.033 0.068 0.121 0.179 3,M
45946.3938 7.051 0.117 0.184 3,M
This example checks on DATA, which is tab delimited. If the line routine
finds an element with zero length, it will take the first element of the
@to_use array, and will push it into the zero length element. There.
Maybe other people feel like providing other functionality :)
--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________
------------------------------
Date: Fri, 24 Jul 1998 10:04:01 -0400
From: George Kuetemeyer <george.kuetemeyer@mail.tju.edu>
Subject: URGENT: Perl 5 and Multiple Processor UNIX Box Problems??
Message-Id: <35B89450.BC473B17@mail.tju.edu>
We recently upgraded an HP K200 box (running HP-UX 10.10) from 1 to 2
processors. After that change, we're noticing that programs called via
the Perl 'system' function sometimes return bogus error codes. Normally,
the programs return either a '200' or '0', depending on success or
failure. Now they may return a -1 or 638479, or whatever. This happens
infrequently, but often enough to be pretty annoying. It doesn't appear
to happen at all if we run the same programs from the command line,
which is why we're thinking "Perl Problem!!" We did recompile, but the
problem persists.
Any thoughts out there? Thanks in advance.
------------------------------
Date: Fri, 24 Jul 1998 07:36:11 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Why can't I "require" a file?
Message-Id: <MPG.10223bb91e5425db989781@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and copy mailed.]
In article <901283176.20914.0.nnrp-07.9e9886e2@news.demon.co.uk> on Fri,
24 Jul 1998 13:27:21 +0000, David Travis <david@system-concepts.com>
says...
> I'm running a Perl script on my ISP's Apache server and it won't let me
> "require" another file. It's not a permissions problem, since the program
> gets past a check to see if the file exists and is readable. Any
> suggestions?
>
> Here's the code fragment:
>
> if (-e "$file" && -r "$file")
> {
> require "$file";
> }
>
> The compiler fails at the require line and complains that $file
> "did not return a true value".
F.Quednau has already answered your question correctly. But you deserve
to lose a few style points in any case. Consider this: How can a file
be read unless it exists? How does "$file" differ from $file?
require $file if -r $file;
should do just fine.
--
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Fri, 24 Jul 1998 15:49:40 GMT
From: Reini Urban <rurban@sbox.tu-graz.ac.at>
Subject: Re: Win NT Perl 5.0 Y2K compliance
Message-Id: <35b8abf3.22856155@judy>
Gellyfish@btinternet.com (Jonathan Stowe) wrote:
>On Tue, 14 Jul 1998 11:24:29 -0700, Michael Yee had in his sig:
>>Michael Yee
>>Disney Worldwide Services, Inc.
>>
>No jokes about Mickey Mouse Operating Systems now.
why not?
this was the best since long!
at least mickey mouse uses perl now.
we still have to wait for uncle bill actively supporting perl as wsh
("windows scripting host")
---
http://xarch.tu-graz.ac.at/autocad/news/faq/autolisp.html
"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg."
-- Bjarne Stroustrup on C++
------------------------------
Date: 12 Jul 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 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 3245
**************************************