[6406] in Perl-Users-Digest
Perl-Users Digest, Issue: 31 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Feb 28 16:27:23 1997
Date: Fri, 28 Feb 97 13:00:24 -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, 28 Feb 1997 Volume: 8 Number: 31
Today's topics:
Re: *perlxstut error : Embedding C/C++ into Perl 5.003 <brett@speedy.speakeasy.org>
Re: ARGV fails on Win32/NT <...petri.backstrom@icl.fi>
Re: Compiling Perl on UnixWare <talbion@xl.ca>
DB_File and DProf doesn't work (Paul Buder)
Re: futur de perl et java-script <...petri.backstrom@icl.fi>
Getting the most out of comp.lang.perl.misc nvp@shore.net
Grabbing text of web pages using perl (Timothy B. Hutchinson)
Re: Grabbing text of web pages using perl (Timothy B. Hutchinson)
Help: IlyaZ's Perl and SIGSEGV (Petr Prikryl)
Re: Help: matching with /RE/ and grep /RE/ are differen (Honza Pazdziora)
Re: Help: matching with /RE/ and grep /RE/ are differen <jgm@dynamicweb.com>
Re: help: syntax error for "}" <...petri.backstrom@icl.fi>
Re: how long before I can put down the books? lvirden@cas.org
Re: How to read files from Perl <seay@absyss.fr>
Re: How to read files from Perl (Gerben Vos)
Re: HTML Frame target <...petri.backstrom@icl.fi>
libdl.a archive... <edavis@nas.nasa.gov>
Re: Matching ! (Mik Firestone)
Re: Multiple actions after or (Tad McClellan)
Re: Newbie Perl / HTML Content-type question (Ben Thompson)
Re: Newbie Perl / HTML Content-type question (Nathan V. Patwardhan)
Re: System command <nachtigall@edcserver1.cr.usgs.gov>
Re: web opens DOS window on scripts <...petri.backstrom@icl.fi>
Re: Win95 Build 110: `cd` fails in install (The next Pele)
Works on unix not on NT 4.0 <mikeloni@altair.com>
Digest Administrivia (Last modified: 8 Jan 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 28 Feb 1997 12:07:39 -0800
From: Brett McCormick <brett@speedy.speakeasy.org>
Subject: Re: *perlxstut error : Embedding C/C++ into Perl 5.003
Message-Id: <7vn2sopud0.fsf@speedy.speakeasy.org>
It doesn't appear that you used to command 'make test', which has
always worked for me. It runs test.pl as if everything had been
installed (well, adding the right paths to the right variables)..
--brett
Michael Smith <mdsmith@qualcomm.com> writes:
>
> John Carter wrote:
> <snip>
>
> > npgts143 30: test1.pl
> > Can't find loadable object for module Test1 in @INC (./blib
> > /opt/perl/lib/sun4-s
> > olaris/5.003 /opt/perl/lib /opt/perl/lib/site_perl/sun4-solaris
> > /opt/perl/lib/si
> > te_perl .) at Test1.pm line 18
> > BEGIN failed--compilation aborted at test1.pl line 5.
>
------------------------------
Date: 28 Feb 1997 17:25:58 GMT
From: "Petri Bdckstrvm" <...petri.backstrom@icl.fi>
Subject: Re: ARGV fails on Win32/NT
Message-Id: <01bc259c$12a0b860$665e40c1@ghoti>
Scott McMahan - Softbase Systems <softbase@mercury.interpath.com> wrote:
> Trond Ruud (troruud@online.no) wrote:
> : Hi,
> : Does anyone know about this problem on NT installations:
> : The script argument list ARGV is always empty!
>
> : $ test.pl arg1 arg2
>
> The registry association for .pl set up by the perl setup script
> says for NT to run "perl.exe %1" for a .pl file, i.e. perl and the
> name of the script. The other command line parms go into the
> bit bucket.
>
> Go into the registry, find the .pl association, and change
> it to perl.exe %1 %2 %3 %4 ... %9
Actually, it is enough on Windows NT to just type
C:\>FTYPE PerlScript=perl.exe %1 %*
and ("ASSOC .pl=PerlScript", if not already done) at
the command prompt (or do it the "hard way" with
REGEDT32 and the Registry).
Anyway, the '%*' allows for any number of arguments (instead
of limiting it by specifying them one by one; no matter how
many you put on the list, it'll some day be too short, and
you - or someone else ;-) - will spend hours trying to figure
out why things aren't behaving the way you expect).
...petri.backstrom@icl.fi
ICL Data Oy
Finland
------------------------------
Date: 28 Feb 1997 20:04:33 GMT
From: "Tim Albion" <talbion@xl.ca>
Subject: Re: Compiling Perl on UnixWare
Message-Id: <01bc25b2$7d8c89e0$f8840cce@dodo.xl.ca>
Welcome to the club
David Getchell <david.getchell@paonline.com> wrote in article
<33036a69.23483879@snews.zippo.com>...
> I am having a hard time getting Perl to compile on UnixWare 2.1. The
> version of Perl is 5.003. It fails several of the tests during the
> self-check. I also was unable to use dynamic loading. Suggestions?
>
------------------------------
Date: 28 Feb 1997 10:34:29 -0800
From: paulb@teleport.com (Paul Buder)
Subject: DB_File and DProf doesn't work
Message-Id: <5f78fl$3ic$1@linda.teleport.com>
I just got the DProf package and was disappointed that it doesn't
work with DB_File. I tried perl -d:DProf myfile where myfile is a
file with the single line use DB_File;. I looked at the first couple
of error messages to see if there was a problem with DB_File's code
but I didn't see any problem. The last error message is a panic
message. I'm using perl5.003_26, DProf-19960930, DB_File.pm 1.08,
and dbfile C library 1.85 on aix 3.25.
Here is the output.
Global symbol "ISA" requires explicit package name at /usr/local/lib/perl5/aix/5.00326/DB_File.pm line 160.
Global symbol "EXPORT" requires explicit package name at /usr/local/lib/perl5/aix/5.00326/DB_File.pm line 161.
Global symbol "AUTOLOAD" requires explicit package name at /usr/local/lib/perl5/aix/5.00326/DB_File.pm line 197.
Variable "$AUTOLOAD" is not imported at /usr/local/lib/perl5/aix/5.00326/DB_File.pm line 201.
Global symbol "AUTOLOAD" requires explicit package name at /usr/local/lib/perl5/aix/5.00326/DB_File.pm line 201.
Bareword "croak" not allowed while "strict subs" in use at /usr/local/lib/perl5/aix/5.00326/DB_File.pm line 206.
String found where operator expected at /usr/local/lib/perl5/aix/5.00326/DB_File.pm line 207, near """
(Might be a runaway multi-line "" string starting on line 206)
(Missing semicolon on previous line?)
Variable "$AUTOLOAD" is not imported at /usr/local/lib/perl5/aix/5.00326/DB_File.pm line 210.
Global symbol "AUTOLOAD" requires explicit package name at /usr/local/lib/perl5/aix/5.00326/DB_File.pm line 210.
Variable "$AUTOLOAD" is not imported at /usr/local/lib/perl5/aix/5.00326/DB_File.pm line 211.
Global symbol "AUTOLOAD" requires explicit package name at /usr/local/lib/perl5/aix/5.00326/DB_File.pm line 211.
Global symbol "VERSION" requires explicit package name at /usr/local/lib/perl5/aix/5.00326/DB_File.pm line 227.
Bareword "croak" not allowed while "strict subs" in use at /usr/local/lib/perl5/aix/5.00326/DB_File.pm line 246.
String found where operator expected at /usr/local/lib/perl5/aix/5.00326/DB_File.pm line 246, near "croak "Usage: \$db->get_dup(key [,flag])\n""
panic: top_env
------------------------------
Date: 28 Feb 1997 17:34:52 GMT
From: "Petri Bdckstrvm" <...petri.backstrom@icl.fi>
Subject: Re: futur de perl et java-script
Message-Id: <01bc259d$51819030$665e40c1@ghoti>
Douglas Seay <seay@absyss.fr> wrote in article <33124232.1140@absyss.fr>...
> I've never met Dominique, but I'd bet that she didn't post in
> english because she doesn't speak it all that well
FWIW, do note that the French name Dominique can also be
held by a "he". ;-)
...petri.backstrom@icl.fi
ICL Data Oy
Finland
------------------------------
Date: 28 Feb 1997 20:37:09 GMT
From: nvp@shore.net
Subject: Getting the most out of comp.lang.perl.misc
Message-Id: <5f7fll$16c@fridge-nf0.shore.net>
$Date: 1997/02/28 02:47:31 $
$Revision: 1.1 $
Posted the week of: Sunday, February 23, 1997
=============================================
This newsgroup has become recently trafficked with numerous questions
not directly related to Perl, particularly CGI and webserver questions,
which are better answered and appropriate, elsewhere. Some of this traffic
ebbed during the auto-faqqing phase, but has recently re-emerged.
Although Perl seems to have become "the other language of the web," and
thus Perl questions have reached a peek, this does not mean that *any*
problem you might encounter when installing, programming, or porting Perl
belongs in this newsgroup. With the scope that Perl is being used, it is
ludicrous to expect that comp.lang.perl.misc netizens should have to answer
*every* question with Perl in the "body text."
If you are a newcomer unfamiliar with netiquette, or Usenet practice,
you will receive the best assistance if you pay attention to the
following:
(1) RESEARCH - Before asking "how do I do x?" READ THE DOCUMENTATION.
Perl developers and other contributors have spent countless hours
documenting Perl, and it's foolish for you not to read it. If you
don't know what to expect from the documentation, or are afraid of
Unix manpages (hey, a riddle is nice every now and again), go to
your local bookstore and buy a Perl 5 book. Tom Christiansen
maintains a list of publications (and reviews) for your perusal,
at: http://www.perl.com/perl/critiques/index.html.
(2) NEWSGROUP - "If all else fails, try Usenet." Seriously, Perl 5
has been around for several years. comp.lang.perl.misc has been
around *much* longer. There are millions of users on the internet,
many of whom have already asked questions on comp.lang.perl.misc
related to Perl 5. Do you think you'll find an answer this way?
You do the math.
*Read* all the articles in the group and search for subject lines
(*see below*) that have keywords you are interested in, like
"directory," or "screen," etc. If you don't find a question that
answers your question, check the Usenet archives at
http://www.dejanews.com, and search for comp.lang.perl.misc. I assure
you that you'll find an answer. :-)
(3) SUBJECT LINES - "Help me - I need help" is among the WORST subject
lines that someone can post to *any* newsgroup. If you have a problem
with this comment, read "Peter and the Wolf," then you'll understand
my point. Several years ago, the volume of postings on Usenet was
dramatically less, and people could use vague subject headers (although
they would be corrected by netizens) and possibly get their questions
answered. Now, *no one sees a red flag* when they read a posting
with a subject like "HELP A NEWBIE," because the "urgent" nature of
the author's posting has been cliched and abused.
(4) ELITISM - There is no such thing. Speaking for myself, I'm tired
of Usenet chaos, and want to help people to help themselves (hence
this note). There must be a way to control this tremendous amount
of traffic while not making people feel bad by correcting their
misdirected postings, killfiling them, and not answering their
questions. I'd like to be part of the solution, not the problem,
so I'm dedicating my time to helping beginners research their
problems properly.
(5) RELEVANCE - Does the posting belong is this newsgroup? If the
group is talking about Perl, please be courteous and stick to
the theme. This group is not a device to ask random questions
and get "well, maybe they won't notice that I'm not supposed to
put this here" answers. Go to killfile. Go directly to killfile.
Do not pass go. Do not collect $200.
(6) CROSSPOSTING - Don't use the "pinyata method". Taking random
swings or stabs at the pinyata, you might accidentally strike
a friend, or even a relative. :-) In other words, don't just
post to a newsgroup if it contains the word "Perl" in the title.
Here's a breakdown of the Perl newsgroups:
o comp.lang.perl -> doesn't exist, so don't post there.
o comp.lang.perl.misc -> this newsgroup, which deals with
the Perl language.
o comp.lang.perl.tk -> a newsgroup dealing with a GUI
extension to the Perl Language.
o comp.lang.perl.modules ->a newsgroup dealing with
Perl modules and development.
o comp.lang.perl.announce -> a newsgroup dealing with
Perl annoucements.
Topics dealing with Minnie Pearl, or Pearl Jam belong elsewhere. :-)
------------------------------
Date: 28 Feb 1997 20:35:59 GMT
From: hutchin@news-server.engin.umich.edu (Timothy B. Hutchinson)
Subject: Grabbing text of web pages using perl
Message-Id: <5f7fjf$ko2@lastactionhero.rs.itd.umich.edu>
Is there a relatively easy way -- or a publicly available script --
which would allow me to grab the text of a web page and append it
to a file? In other words, the input for a filehandle would be the
web page -- is this possible?
I'm sure this has come up before -- so my apologies for the repetition,
but I wasn't able to find anything in FAQs or CPAN. Hope someone
can help -- this would greatly simplify a project I'm working on.
Thanks!
Tim Hutchinson
------------------------------
Date: 28 Feb 1997 20:39:40 GMT
From: hutchin@news-server.engin.umich.edu (Timothy B. Hutchinson)
Subject: Re: Grabbing text of web pages using perl
Message-Id: <5f7fqc$ko2@lastactionhero.rs.itd.umich.edu>
Oops -- my news programme messed up my e-mail address -- it's actually
hutchin@umich.edu.
Timothy B. Hutchinson wrote:
: Is there a relatively easy way -- or a publicly available script --
: which would allow me to grab the text of a web page and append it
: to a file? In other words, the input for a filehandle would be the
: web page -- is this possible?
------------------------------
Date: 28 Feb 1997 19:46:26 GMT
From: prikryl@dcse.fee.vutbr.cz (Petr Prikryl)
Subject: Help: IlyaZ's Perl and SIGSEGV
Message-Id: <5f7cmi$605@boco.fee.vutbr.cz>
Hi all,
I have a problem with Ilya Zakharevich's Perl 5.00305 port for
OS/2, DOS, and Win. To be short, whenever I run a script that uses
glob() or backticks, the Perl quits with the message:
Process terminated by SIGSEGV
This happens only when I run it from plain MS-DOS. It does not happen
when I run it from Win'95. The script can be as simple as:
glob("*");
>From the README.os2 documentation I learned that this could be caused
by an improper instalation of sh.exe (which is used when solving globs
and backticks). However, I did installed it and made it accessible via
PATH. I even replaced the emxl.exe portion of it from version 0.9b to
0.9c by emxbind. I also replaced all references in Config.pm so that
the variables point to the sh.exe. I call the perl_.exe via the batch
file where even perl_sh_dir is set:
------------------------------------------------------
@echo off
set perlroot=c:\perl
set path=%perlroot%\bin;%path%
set emxopt=-c -t
set perllib_prefix=f:/perllib c:/perl
set perl_sh_dir=%perlroot%/bin
set LFN=N
%perlroot%\bin\perl_.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
------------------------------------------------------
As the behaviour is different in Win and DOS (version 6.22), there
may be some problem with emx.exe. Both emx.exe (0.9c) and rsx.exe
(5.10) are placed in c:\perl\bin.
Could anybody tell me, where can be the problem or what shoud I try?
Maybe I am too blind to see the apparent error after all the hacking
I did with it ;-)
Thanks for any information,
Petr
--
Petr Prikryl (prikryl@dcse.fee.vutbr.cz) http://www.fee.vutbr.cz/~prikryl/
TU of Brno, Dept. of Computer Sci. & Engineering; tel. +420-(0)5-7275 218
------------------------------
Date: Fri, 28 Feb 1997 18:20:21 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: Help: matching with /RE/ and grep /RE/ are different!
Message-Id: <adelton.857154021@aisa.fi.muni.cz>
Pierre BERGDOLT <Pierre.Bergdolt@ansf.alcatel.fr> writes:
> Hi there,
> I have got a problem with a perl script that deal with rcs log file.
> Consider the following example:
>
> @reslog=`rlog $rcsfile`;
> @lstrelfic=();
> foreach $_ (@reslog) {
> if (/^\s*revision\s+(\d+\.\d+)\s+.*$/) { push(@lstrelfic, $1); }
> }
>
> this give me a empty list for @lstrelfic (I expect a one element list
> with "2.1" as value). A grep command with the same matching expression
I am sorry, but I get exactly what you said, '2.1' withou any
new-line. I used this version of your program:
$ perl
@reslog = <>;
@lstrelfic=();
foreach $_ (@reslog) {
if (/^\s*revision\s+(\d+\.\d+)\s+.*$/) { push(@lstrelfic, $1); }
}
print "@lstrelfic"; ## here I press ^D
and fed it with the data below and got 2.1 on output. Cannot the
problem be with the rest of your *probably longer) script?
With grep, the result is the same.
Hope this helps.
--
------------------------------------------------------------------------
Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
I can take or leave it if I please
------------------------------------------------------------------------
------------------------------
Date: Fri, 28 Feb 1997 15:32:41 -0500
From: JG Motolanez <jgm@dynamicweb.com>
To: Pierre BERGDOLT <Pierre.Bergdolt@ansf.alcatel.fr>
Subject: Re: Help: matching with /RE/ and grep /RE/ are different!
Message-Id: <331740E9.18DC@dynamicweb.com>
Pierre BERGDOLT wrote:
>
> Hi there,
> I have got a problem with a perl script that deal with rcs log file.
> Consider the following example:
>
> @reslog=`rlog $rcsfile`;
> @lstrelfic=();
> foreach $_ (@reslog) {
> if (/^\s*revision\s+(\d+\.\d+)\s+.*$/) { push(@lstrelfic, $1); }
> }
>
> this give me a empty list for @lstrelfic (I expect a one element list
> with "2.1" as value). A grep command with the same matching expression
> give different result:
>
> @matchingline=grep(/^\s*revision\s+(\d+\.\d+)\s+.*$/, @reslog);
>
snip--
Without looking too deeply, my guess is that the problem is in the way
foreach $_ (@reslog) {
is working.
Why not try:
#!/usr/local/bin/perl
@lstrelfic=();
open(RLOG, "rlog $rcsfile|");
while(<RLOG>){
if (/^\s*revision\s+(\d+\.\d+)\s+.*$/) { push(@lstrelfic, $1); }
}
close(RLOG);
foreach(@lstrelfic){
print "lstrelfic:$_\n";
}
I think it will give you what you are looking for.
#*-------------------------------------------------------------*#
# JG Motolanez - Webmaster - DynamicWeb Transaction Systems #
# http://www.dynamicweb.com `\\//' #
# mailto:jgm@dynamicweb.com }oo{ #
#*------------------------------------ooO - Ooo---------------*#
------------------------------
Date: 28 Feb 1997 17:46:04 GMT
From: "Petri Bdckstrvm" <...petri.backstrom@icl.fi>
Subject: Re: help: syntax error for "}"
Message-Id: <01bc259e$e1db2ff0$665e40c1@ghoti>
Keith Warner Colvin <colvin@aloha.net> wrote in article
<colvin-2402971136300001@hawaii-103.u.aloha.net>...
> I am trying to run a .cgi, and I get these error messages,
> I have tried a number of things, what is the advice of you who know more?
>
>
> # Unmatched right bracket, at end of line
> Line 140
> # syntax error, near "}"
> Line 140
> # aborted due to compilation errors.
>
> Mahalo for your time,
> kc.
Well, it means that your "a .cgi" (presumably a script written
in the Perl language) has a syntax error (either, as the error
says, an unmatched right bracket, or something else that makes
Perl think there's a bracket missing).
Without seeing the code it is impossible to say anything, except
to ask you to look at code at line 140 or before, and figure it
out yourself).
Thanks for the "Mahalo" (whatever it is ;-) I'll give you
"ole hyvd" ("you're welcome" - more or less - in English)
in return.
...petri.backstrom
ICL Data Oy
Finland
------------------------------
Date: 27 Feb 1997 21:56:29 -0500
From: lvirden@cas.org
Subject: Re: how long before I can put down the books?
Message-Id: <5f5hgt$5k7@csa21s4m.cas.org>
According to Richard Morin <qnc496@durhamnews.net>:
:curious about something. How long before most folks felt even
:slightly proficient and could take the llama and camel books
:off the desk beside them? I feel kinda lame havin' to go back
Shoot - I can't even keep my kids' names straight - I'll _never_
be able to keep perl straight...
--
Larry W. Virden INET: lvirden@cas.org
<URL:http://www.teraform.com/%7Elvirden/> <*> O- "We are all Kosh."
Unless explicitly stated to the contrary, nothing in this posting should
be construed as representing my employer's opinions.
------------------------------
Date: Fri, 28 Feb 1997 18:04:18 +0000
From: Douglas Seay <seay@absyss.fr>
To: fg6ops <fg6ops@ocean.com.au>
Subject: Re: How to read files from Perl
Message-Id: <33171E22.2DB8@absyss.fr>
fg6ops wrote:
>
> I'm currently trying to read text data from seven different files. These
> files are generated by my Perl program. Each of them has two colums and try
> to write them to a single file which will have fourteen colums in order
> from left to right.
> I 'm not sure how to do it. Please help!
why not try the painfully obvious? open seven files,
read a line from the first file (grabs two columns)
and write those two columns to your output, go to the
next file and do the same. after the seventh file,
print "\n". Voila, 14 columns per line of output.
doug seay
seay@absyss.fr
PS - no need to crosspost this to c.l.p.modules
------------------------------
Date: 28 Feb 1997 16:29:11 GMT
From: gerben@localhost.cs.vu.nl (Gerben Vos)
Subject: Re: How to read files from Perl
Message-Id: <5f714n$ft3@star.cs.vu.nl>
"fg6ops" <fg6ops@ocean.com.au> writes:
>I'm currently trying to read text data from seven different files. These
>files are generated by my Perl program. Each of them has two colums and try
>to write them to a single file which will have fourteen colums in order
>from left to right.
Do i see a mention of a Perl module in your question? No? Then this
is not an appropriate question for comp.lang.perl.modules .
It is appropriate for comp.lang.perl.misc, however.
Anyway, if all those files are guaranteed to contain an equal number of
lines, try something along these lines:
open FILE1, "file1" or die "Ouch!";
...
open FILE7, "file7" or die "Aaargh!";
open OUT, ">outfile" or die "???";
while (defined($line1 = <FILE1>))
{
$line2 = <FILE2>;
...
$line7 = <FILE7>;
# Join the lines using tab characters.
# Replace \t with your favourite field separator.
print OUTFILE join '\t', $line1, $line2, ..., $line7;
}
close FILE1 or die "Oops!";
...
close FILE7 or die "Eh...";
close OUT or die "!!!";
--
Gerben Vos
. . . . . . . . . . . . . . . . . . . . . . . . . . . G e r b e n V o s <><
mailto:gerben@cs.vu.nl http://www.cs.vu.nl/%7Egerben/
Ceci n'est pas une .signature .
--
Gerben Vos
------------------------------
Date: 28 Feb 1997 18:36:50 GMT
From: "Petri Bdckstrvm" <...petri.backstrom@icl.fi>
Subject: Re: HTML Frame target
Message-Id: <01bc25a5$f901fd60$665e40c1@ghoti>
Lon Hosford <lon@hosfordusa.com> wrote:
> How do you have Perl5 generate an HTML page on client in an HTML frame
> target window?
>
> This is a case where the search HTML is in the same frame that I wish
> the the results HTML to appear. I have the Perl program working just
> great. But I have no clue on this one.
See comp.infosystems.authoring.cgi (and .html), as this isn't
really a Perl issue at all.
Anyway, the target is specified by the HTML page (using
target="frame name") that initiated the Perl script.
When you're as far as the Perl script, you have no information
of which frame (or if it was any frame) initiated the invocation
of the script (only the browser knows, or you do, if it was
a page you generated, but you can't do anything to redirect
the output, except by changing the original page).
In other words, do, e.g.,
<form method="POST"
action="/cgi-bin/your-cgi-script.cgi"
target="the frame where you want the output of above script">
in the "search HTML".
...petri.backstrom@icl.fi
ICL Data Oy
Finland
------------------------------
Date: Fri, 28 Feb 1997 09:43:47 -0800
From: "Eric A. Davis" <edavis@nas.nasa.gov>
Subject: libdl.a archive...
Message-Id: <33171953.167E@nas.nasa.gov>
Hello,
I am trying to build Perl5 and I noticed that I don't have libdl.a. The
libdl.so.x.x
exists but not the archive. Does anyone know what this libraray is used
for and
where I can get the sources??? I am using the latest Linux Slackware
Distribution with
kernel 2.0. Thanks.
--
Eric Allen Davis Network Engineer
edavis@nas.nasa.gov NASA Ames Research Center
(415)604-2543 NAS Systems Division
Pager: (415)428-6931
------------------------------
Date: 28 Feb 1997 19:02:35 GMT
From: mfiresto@vnet.ibm.com (Mik Firestone)
Subject: Re: Matching !
Message-Id: <5f7a4b$n7s$1@mail.lexington.ibm.com>
In article <01bc2588$91f58d20$e022ea9e@P01223.logica.co.uk>,
Matthew O'shea <osheam@logica.com> wrote:
>I am writting a simple search engine locate appropriate files given a user
>entered Key word.
>
>Its all going fine except when I enter "c++" the code falls over - as it
>appears to try and Increment the search criteria.
>
[snip]
> if (/\b$QueryWords\b/i)
[snip]
> if ((/\b$QueryWords\b/i))
>Can Anyone help ?
I think I can. This is a problem with a lot of different search engines.
As near as I can tell, Perl first replaces the variable, then evaluates the
RE. In this case, your RE becomes: if (/\bc++\b/i ). Which is saying
something entirely different than what you intended - roughly, find one or
more instances of one or more c's on a word boundary. Try using the quotemeta to prevent this ( see pages 67 and 201 in the Camel for more information, or try man perlre and man perlfunc ).
For example, I think the following will behave more as you anticipate:
if (/\b\Q$QueryWords\E\b/i)
Htth,
-----
Mik Firestone mfiresto@mindspring.com
Evil Overlord Rule #22: I will never utter the sentence "But before I
kill you, there's just one thing I want to know."
------------------------------
Date: Fri, 28 Feb 1997 11:38:29 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Multiple actions after or
Message-Id: <l657f5.t22.ln@localhost>
Richard Arnesen (rdarnese@nortel.ca) wrote:
: Lets say I have a statement where after the first part of it I have an or.
: Within the or I want to print something to STDERR and then set a variable.
: Unfourtanetly I have for some reason been unable to get this to work
: because of syntax.
^^^^^^^^^^^^^^^^^
What syntax?
Where's the code?
: Any help would be appreciated.
Any code would be appreciated ;-)
--
Tad McClellan SGML Consulting
Tag And Document Consulting Perl programming
tadmc@flash.net
------------------------------
Date: Fri, 28 Feb 1997 11:13:37 GMT
From: ben@mendip.com (Ben Thompson)
Subject: Re: Newbie Perl / HTML Content-type question
Message-Id: <3316bbd3.13780243@snews.zippo.com>
On 27 Feb 1997 15:15:32 GMT, nvp@shore.net (Nathan V. Patwardhan)
wrote:
>Parillo (lparillo@newshost.li.net) wrote:
>
>: I expected it to be "eaten" by my web server.
>: BTW it is IIS 2.0, and I am running Perl 5.
>
>comp.lang.perl.misc has nothing to do with webservers. There are some
>servers groups, like comp.infosystems.www.servers.misc.
>
>Your server's docs/helpfiles will certainly put you in the right direction.
Unfortunately this problem has nothing to do with Web servers. On NT
Perl comes in three varietys, Perl, a Perl IIS extension (for
Microsofts IIS server) and Perl Script.
One problem with the Perl IIS extension is that it sends the HTML
format information for the script before it starts running it. As such
you do not need to send the document type information that other
Windows and Unix WWW servers require.
(Note that this is a common error due to some poorly phrased comments
used in the NT perl installation package. I know of at least four
experienced (2 years +) Web programmers who have had the same problem.
Given enough time I would have a web site.
Unfortunately, I have to let my work speak for itself.
------------------------------
Date: 28 Feb 1997 18:12:12 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Newbie Perl / HTML Content-type question
Message-Id: <5f775s$l7q@fridge-nf0.shore.net>
Ben Thompson (ben@mendip.com) wrote:
: >comp.lang.perl.misc has nothing to do with webservers. There are some
: >servers groups, like comp.infosystems.www.servers.misc.
: Unfortunately this problem has nothing to do with Web servers. On NT
: Perl comes in three varietys, Perl, a Perl IIS extension (for
: Microsofts IIS server) and Perl Script.
Very well then, but it still doesn't belong here.
--
Nathan V. Patwardhan
nvp@shore.net
"A stitch in time saves nine."
------------------------------
Date: Fri, 28 Feb 1997 19:38:51 GMT
From: Neal Nachtigall <nachtigall@edcserver1.cr.usgs.gov>
To: Patrick Lim <limpj@sterlingdi.com>
Subject: Re: System command
Message-Id: <3317344B.331C@edcserver1.cr.usgs.gov>
Patrick Lim wrote:
> $rc = system(test.sh '"Test guy"' '"phone number"');
>
> From the command line, rc is 0. From a CGI,
> rc is 0x100 (which is exit status 1).
>
> Why are we getting this?
Not for sure, but we experienced something kinda similar,
but different.
Our (NON-CGI) script was using extensions into a C library and also
executing system calls in which we were checking the perl
special variable $? (status returned by the last `COMMAND`,
pipe close or system operator). If we "use"d our extension
module and executed a system call the value of the variable
indicated an error even though we knew it was successful,
but if we temporarily removed the use of the extension
module we did not get an error value. To correct this we
started reinitializing the $? variable before every system
call:
undef $!; #set errno to NULL also
$? = 0; #initialize exit status
system ("do_something");
die "Success\n" if($? == 0);
die "Failure\n" if($? != 0);
then the value appeared to be correct.
HTH,
--
Neal L. Nachtigall * nealnach@dlgef.cr.usgs.gov
Hughes STX (EROS Data Center)
No wonder nobody comes here--it's too crowded. -Yogi Berra
------------------------------
Date: 28 Feb 1997 19:05:07 GMT
From: "Petri Bdckstrvm" <...petri.backstrom@icl.fi>
Subject: Re: web opens DOS window on scripts
Message-Id: <01bc25a9$ec980de0$665e40c1@ghoti>
Wayne Will <xaren@ascentech.com> wrote in article
<3311E560.7649@ascentech.com>...
> I'm almost certain I've missed something in setup.
>
> When my scripts are opened from a browser, it dowloads it, and runs it
> in a DOS window. I try taking off read access rights, and the browser
> can't find the file.
>
> I'm useing this to access the script from a form, and have reduced
> everything to the simplest of commands.
> <FORM METHOD="get" ACTION="temp/register.pl">
>
> Can anyone help or give a suggestion?
>
> No one around here has anymore Ideas.
This is not a Perl problem at all, but something you should've
taken up in, e.g., comp.infosystems.www.authoring.cgi, or
someplace where your particular web server is discussed.
If your script is run in a DOS window by the browser, then it
means:
a) You have misconfigured your web server (or misunderstood
how CGI scripts - written in Perl or whatever language -
are invoked).
That is, you have not set the "temp/" directory under the
current root to execute only. Or, alternately, put your
script in a directory that already *IS* set to execute only
(usually someplace that the web server alias /cgi-bin points
to).
How it is done depends on your server (that is, consult
your server documentation).
In other words, the code shouldn't even be sent to your
browser.
b) The fact that your browser runs the Perl code in a DOS
window (besides being mistakenly - well, the server only
does what you tell it to do, and you didn't tell it to
run .pl files on the server - sent the actual code), stems
from you having locally a Perl interpreter installed, and
an assocociation to it for files with a .pl extension, and
configuring your browser to execute data/files sent (when
a web server sends it to it).
...petri.backstrom@icl.fi
ICL Data Oy
Finland
------------------------------
Date: 28 Feb 1997 20:33:01 GMT
From: gt1535b@acmey.gatech.edu (The next Pele)
Subject: Re: Win95 Build 110: `cd` fails in install
Message-Id: <5f7fdt$bn@catapult.gatech.edu>
Charles Henkel (csh@henktech.com) wrote:
: Context:
: P6 Pentium Pro
: Win 95
: Perl 5.001m build 110
: Problem:
: On some machines, the perl installation script "install.bat"
: fails to determine the current directory name. The script is doing
: something like "$curdir = `cd`", and it's the command substitution
: that fails.
: Invoking the perl debugger and issuing a similar command by hand, the
: correct result of the "cd" command is displayed on the screen, but not
: assigned to the string var.
: Has anyone else seen this? Odd thing is that in a collection of half a
: dozen or so supposedly identical machines, it works fine on four of
: them and fails on the other two.
: Please also email responses.
try using "pwd.pl"
--
<>< Daryl Bowen <><
Georgia Institute of Technology
Internet: gt1535b@prism.gatech.edu
Siemens Stromberg-Carlson Co-op
------------------------------
Date: Fri, 28 Feb 1997 12:13:45 -0500
From: Pete Mikelonis <mikeloni@altair.com>
Subject: Works on unix not on NT 4.0
Message-Id: <33171249.68EC@altair.com>
I am trying to check if anything is coming in from STDIN.
This code work on unix but not on NT4.0 with Perl for Win32 Build 110.
The vec returns a smiley face in $rin and then the select blows up.
Please email an an answer if you have one.
Thanks.
$rin = '';
vec($rin, fileno(STDIN), 1) = 1;
if ( select($rout=$rin, undef, undef, 1) )
{
chomp(@g_stdin_files = <STDIN>);
}
--
==================================================================
Pete Mikelonis | Url : http://www.altair.com
Altair Computing, Inc. | Email: mikeloni@altair.com
1757 Maplelawn Drive | Phone: (810) 614-2400 ext 239
Troy, MI 48084-4004 | Fax : (810) 614-2411
==================================================================
------------------------------
Date: 8 Jan 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Jan 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.
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 31
************************************