[7856] in Perl-Users-Digest
Perl-Users Digest, Issue: 1481 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Dec 16 09:07:38 1997
Date: Tue, 16 Dec 97 06:00:58 -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 Tue, 16 Dec 1997 Volume: 8 Number: 1481
Today's topics:
ANNOUNCE: libwin32 version 0.09 released (Gurusamy Sarathy)
CR/LF Text-File (Tobias Poppe)
Re: CR/LF Text-File <xxTony.Curtis@vcpc.univie.ac.at>
Re: Experience Shared: Rule 2 of reg. exp. matching (Tom Grydeland)
failed exec() <daminste@mailbox.syr.edu>
Re: find and replace <koos_pol@bigfoot.com>
Re: find and replace (keefner)
Re: ftp a file <xxTony.Curtis@vcpc.univie.ac.at>
Re: ftp a file peter.edlund@capgemini.se
Highlight diff between documents <guojiany@iscs.nus.edu.sg>
How do I send data to my perl script? <t-n-g@algonet.se>
Re: How do I send data to my perl script? peter.edlund@capgemini.se
How to stop 'read' from waiting for ever in perl v5.004 <dafydd@gwe.co.uk>
Re: newbie file input question peter.edlund@capgemini.se
Newbie, very newbie <sgiraldo@unisys.com.br>
Pattern Matching .* <psyche@dial.pipex.com>
Re: Pattern Matching .* <kompas@galaxy.uci.agh.edu.pl>
Perl 5.004.04 Binary Package for Siemens Nixdorf RM Sys <ridderbusch.pad@sni.de>
Re: Perl Installation on SUN Netra i peter.edlund@capgemini.se
Perl script for form processing <dan@webhse.com>
Re: perldb: Undefined subroutine &Carp::longmess (Ilya Zakharevich)
Really newbie question <moe1@netvision.net.il>
Re: recursive regex? (Lars Gregersen)
Re: Teaching programing <talkasab@opal.tufts.edu>
Re: Teaching programing <dformosa@st.nepean.uws.edu.au>
Re: Teaching programing <adavid@netinfo.com.au>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 16 Dec 1997 13:00:24 GMT
From: gsar@engin.umich.edu (Gurusamy Sarathy)
Subject: ANNOUNCE: libwin32 version 0.09 released
Message-Id: <675u18$knm$1@news1.teleport.com>
Keywords: perl win32 modules
A new version of libwin32 is making its way into the CPAN.
http://www.perl.com/CPAN/authors/id/GSAR/libwin32-0.09.tar.gz
The README from the distribution follows.
Just give it,
- Sarathy.
gsar@umich.edu
--------------------------------------------------------------------------
Welcome to libwin32 version 0.09.
WHAT
----
This is a bundle of "Win32-only" extensions that provides a quick migration
path for people wanting to use the core support for win32 in perl 5.004
and later. It features the complete set of Win32-specific extensions
available from CPAN that could previously only be used with Activeware's
"Perl for Win32"(TM).
Most other non-Win32 extensions should build fairly smoothly using
the MakeMaker support available in perl 5.004 and later, so they are
not included in this bundle.
---NOTE----NOTE----NOTE----NOTE----NOTE----NOTE----NOTE----NOTE---NOTE---
| |
| This distribution does not contain binaries. Look for a binary |
| distribution of the latest perl and various other goodies on CPAN. |
| |
---NOTE----NOTE----NOTE----NOTE----NOTE----NOTE----NOTE----NOTE---NOTE---
WHAT HAS CHANGED
----------------
OLE has been seriously overhauled, thanks largely to the valiant efforts
of Jan Dubois <jan.dubois@ibm.net>. Jan has added many exciting new
features, and a much more streamlined implementation. See the pod
documentation for compatibility info.
The AdminMisc extension has been dropped, because newer versions with
support (and binaries) for the standard perl port are available from the
original author. See "http://www.rothd.net/perl" for details.
New compatibility functions (got via C<use Win32;>) : LookupAccountName(),
LookupAccountSID(), InitiateSystemShutdown(), AbortSystemShutdown(),
ExpandEnvironmentStrings().
Numerous bugs have been fixed. See "Changes" files in individual module
subdirectories.
WHAT IT HAS
-----------
This bundle contains:
* The collection of modules originally distributed by the Activeware
folks as part of their "Perl for Win32"(TM) port. These have been
modified so that they will build under MakeMaker using perls greater
than 5.004 and Visual C++. Along the way, I have added many
bugfixes to make these modules work correctly.
The complete list of Activeware extensions is available:
Win32/ChangeNotify
Win32/EventLog
Win32/File
Win32/FileSecurity
Win32/IPC
Win32/Mutex
Win32/NetAdmin
Win32/NetResource
Win32/OLE
Win32/Process
Win32/Registry
Win32/Semaphore
Win32/Service
Win32/WinError
Note this covers all of the Win32 extensions distributed by
Activeware (as of build 313).
These extensions have been re-engineered to use the XS interface
language, yet the changes are compatible with the originals. This
should minimize any problems for people wanting to migrate their
application to 5.004. The design of these modules is subject to
change in future.
The only deliberately incompatible change is in the Win32::OLE
module. While the Activeware port used the "OLE::" and "Win32::"
namespaces for the functionality contained in this module, this
port uses "Win32::OLE::" consistently. For a list of other
incompatibilities in Win32::OLE, see the embedded documentation
in "OLE/OLE.pm".
* The following five modules maintained by Aldo Calpini
<dada@divinf.it>:
Win32/Clipboard
Win32/Console
Win32/Internet
Win32/Shortcut
Win32/Sound
These also have been converted back to XS. I have added
bug fixes as I found them during the conversion process.
* Two useful modules maintained by Dave Roth <rothd@roth.net>.
Win32/ODBC
Win32/Pipe
These have only received just the bare modifications needed to
build them under MakeMaker. *.xs are really C/C++ files
masquerading as XS. Win32/ODBC hasn't been tested much.
WHAT TO DO
----------
This collection will build with perl5.004_01 and later on the Windows
NT platform. Building on Windows 95 is not supported (but it may be
possible if you use the 4DOS command shell, but YMMV).
+ First you need to build perl 5.004_01 or later (you will need
either Visual C++ 4.x+ or Borland C++ 5.02+), and install it. See
README.win32 in the perl distribution for details on how to build
perl for the Win32 platform.
+ That done, you need to extract this distribution into an NTFS
partition (the tests in the FileSecurity module and Net* modules
will fail otherwise). The testsuite for OLE needs Excel to
run. NetAdmin will only work if you have some kind of
live network connection, and are in a domain with a properly
configured domain controller. NetResource requires that you
be part of a domain or workgroup. You may also need
Administrator privileges for running some of the tests.
If one or more of these conditions will not be met, you may
wish to build in the subdirectories one by one. The steps
below will work either at the toplevel directory, or in each
of the individual extension subdirectories.
+ You need either MS Visual C++ (NetAdmin needs ver. 4.x+, Internet
needs ver. 5.0. ver. 2.0 should suffice for the others) or
Borland C++ 5.02. Make sure you have the full installation of
either of these compilers ("Minimal" installations or CDROM-based
installations may have problems finding all the libraries).
+ If the Internet extension doesn't build due to lack of libraries
(the wininet.h header is included), fetch the libraries from
Aldo Calpini's website: "http://www.divinf.it/data/perl/internet/".
Look for a file named "WinInet.zip". If the wininet.h or wininet.dll
in your system are newer than the ones in WinInet.zip, discard them
before copying WinInet.lib into the Internet/ directory.
+ perl Makefile.PL [either at toplevel or in subdirs]
+ $MAKE [either at toplevel or in subdirs]
+ $MAKE test [optional, some interactive tests]
+ $MAKE install [either at toplevel or in subdirs]
$MAKE above stands for either "dmake" or "nmake" depending on your
available compiler, and perl configuration.
WHAT THEN
---------
A brief statment of intent: I am doing this to ease the transition
for many people who may wish to start using the latest perl on win32
platforms. Long term development of these modules remains the
responsibility of the respective authors.
I wish to thank the authors of these modules for their effort in making
them useful, and for making them freely available.
If you find any problems with these modules, kindly report them to
me. While I have fixed many problems in these modules, I may also have
introduced brand new bugs in the process :)
Suggestions, patches, testsuite additions, wholesale rewrites and
additional ports of modules welcome.
Enjoy!
Gurusamy Sarathy
gsar@umich.edu
14 December 1997
WHATEVER
--------
Copyright for the following modules:
ODBC Pipe Clipboard Console Internet Shortcut Sound
is held by the respective authors. Look in the module subdirectories
for any conditions of use.
The following copyright applies to the remaining, Activeware-derived
modules (unless stated otherwise):
(c) 1995 Microsoft Corporation. All rights reserved.
Developed by ActiveWare Internet Corp., http://www.ActiveWare.com
Other modifications (c) 1997 by Gurusamy Sarathy <gsar@umich.edu>
You may distribute under the terms of either the GNU General Public
License or the Artistic License, as specified in the README file
of the Perl distribution.
------------------------------
Date: 16 Dec 1997 13:13:52 GMT
From: udta@rzstud1.rz.uni-karlsruhe.de (Tobias Poppe)
Subject: CR/LF Text-File
Message-Id: <675uqg$iuf$1@nz12.rz.uni-karlsruhe.de>
Hello *.*
I want to read a string from a Text-File.
Sure, no problem.
But every string in the TEXT-file ends width a
CR/LF. (yes, it's a dos-text-file).
But the perl/skript runs on a LinuX-System.
How can i read strings from a text-file with cr/lf at the end of each
line on a LinuX-Plattform ???
Thanx...
--
MfG Tobias Poppe - Informatik HQ Karlsruhe
*** eMail udta@rz.uni-karlsruhe.de ***
** sysop@hmc-bbs.org **
------------------------------
Date: 16 Dec 1997 14:21:46 +0100
From: Remove xx <xxTony.Curtis@vcpc.univie.ac.at>
Subject: Re: CR/LF Text-File
Message-Id: <7xlnxltod1.fsf@vcpc.univie.ac.at>
Re: CR/LF Text-File, Tobias
<udta@rzstud1.rz.uni-karlsruhe.de> said:
Tobias> But the perl/skript runs on a LinuX-System. How can
Tobias> i read strings from a text-file with cr/lf at the
Tobias> end of each line on a LinuX-Plattform ???
Do this to the input line
s/\r$//;
That will remove the CR (\r) if there's one at the end.
hth,
tony
------------------------------
Date: 16 Dec 1997 11:22:44 GMT
From: Tom.Grydeland@phys.uit.no (Tom Grydeland)
Subject: Re: Experience Shared: Rule 2 of reg. exp. matching
Message-Id: <slrn69cp44.nph.Tom.Grydeland@mitra.phys.uit.no>
On Mon, 08 Dec 1997 19:44:05 -0500,
Robert S. Kissel <kissel@kissel.spicerack.ibm.com> wrote:
[...]
> and, for this purpose, composed the a substitution like this:
> s/<TAG[^>]*(?:\bA\s*=\s*([^\s]*|"[^"]*"))[^>]*>/$+/gi;
> Please note this part, here---^^^^^^^^^^^^^^^^
[...]
> I would have expected the LONGER one (in this case the double-quoted
> possibility) to get captured; instead, the shorter, first alternative
> got captured.
That's right. Perl uses "traditional" semantics for alternatives,
rather than POSIX semantics, which is what you're expecting.
[...]
> My experience with this problem struck me as a good illustration of
> the meaning of "Rule 2" (p. 61 in the blue Camel Book), and the trap
> we can fall into if we don't know it.
Of course, now that you know it, you can turn it to your advantage;
simply switch the order of your alternatives:
s/<TAG[^>]*(?:\bA\s*=\s*("[^"]*"|[^\s]*))[^>]*>/$+/gi;
> Thank you for your kind attention.
--
//Tom Grydeland <Tom.Grydeland@phys.uit.no>
------------------------------
Date: Tue, 16 Dec 1997 08:34:38 -0500
From: David Minsterman <daminste@mailbox.syr.edu>
Subject: failed exec()
Message-Id: <3496836E.A10D066C@mailbox.syr.edu>
I really need some advice!
I wrote a simple perl script. I am attempting to use it to start a java
program. The entire script works fine from the command line but fails
when I try to start it from and HTML link.
What I am using is this: exec "java $programname"
where $programname is the java class file that I want to run. Are there
any security restrictions on exec() imposed by a server when accessed
over the web as opposed to from the command line?
TIA
Dave
------------------------------
Date: Tue, 16 Dec 1997 09:57:12 +0100
From: Koos Pol <koos_pol@bigfoot.com>
Subject: Re: find and replace
Message-Id: <34964268.42ED@bigfoot.com>
>Hello !
>
> I need a script to find a paricular word or phrase in files of a given directory,
> then replace all at once by another word or phrase.
> Its to get a word referenced by an explanation in another file (html).
> Is there such a script (perl) or easy to make?
> Any suggestions are wellcomed.
>
I have written a recursive search-and-replace script to maintain my html
files.
It uses an INI file for it's actions. You can choose to keep or ignore
EOL's (handy for html which can span multilpe lines)
Send an email with a subject line of "request: blockchange.pl" for my
autoresponder.
--
Koos Pol
----------------------------------------------------------------------
S.C. Pol tel: +31 20 3116122
PC Systems Administrator email: Koos_Pol@bigfoot.com
Compuware Europe PGP public key available upon request
A little inaccuracy sometimes saves tons of explanation.
-- H. H. Munroe
------------------------------
Date: Tue, 16 Dec 1997 13:45:42 GMT
From: keefner@visi.com (keefner)
Subject: Re: find and replace
Message-Id: <349685b5.997617828@news.visi.com>
On 15 Dec 97 21:28:40 GMT, jimknopf@Lummerland.halberstadt.netsurf.de
(Andreas Kraska) wrote:
>
>Hello !
>
>I need a script to find a paricular word or phrase in files of a given directory, then replace all at once by another word or phrase.
>Its to get a word referenced by an explanation in another file (html).
>Is there such a script (perl) or easy to make?
>Any suggestions are wellcomed.
treesed is a perl script that is free and it does search
and replace, also recursively if so instructed.
It also does double duty as an excellent find utility.
I've used it under Irix, Sun, and NT without any problem.
Craig
------------------------------
Date: 16 Dec 1997 09:50:23 +0100
From: Remove xx <xxTony.Curtis@vcpc.univie.ac.at>
Subject: Re: ftp a file
Message-Id: <7xyb1lsmcw.fsf@vcpc.univie.ac.at>
Re: ftp a file, PETER <PETER@yalevm.ycc.yale.edu> said:
PETER> Hello. Would anyone be so kind as to post an example
PETER> of "ftp"ing a file from within Perl? Thanks.
perldoc Net::FTP
hth,
tony
------------------------------
Date: 16 Dec 1997 09:20:44 GMT
From: peter.edlund@capgemini.se
Subject: Re: ftp a file
Message-Id: <675h5c$g84$1@news.capgemini.se>
hmm, have you considered looking in a CPAN site under the directory 'scripts/ftpstuff'?
//peter.
>
> ftp a file
>
> From: PETER@yalevm.ycc.yale.edu
> Reply to: PETER@yalevm.ycc.yale.edu
> Date: Mon, 15 Dec 97 22:47:41 EST
> Organization: Yale University Computer Center
> Newsgroups:
> comp.lang.perl.misc
> Followup to: newsgroup(s)
>
>Hello. Would anyone be so kind as to post an example of "ftp"ing a file
>from within Perl? Thanks.
--
-------------------------
Peter Edlund
UNIX development engineer
Cap Gemini
peter.edlund@capgemini.se
------------------------------
Date: 16 Dec 1997 11:29:32 GMT
From: Guo Jianyu <guojiany@iscs.nus.edu.sg>
Subject: Highlight diff between documents
Message-Id: <675oms$4ck@nuscc.nus.sg>
Hi,
I'm just wondering if there's any software that can compare two
documents(e.g HTML files) and highlight the differences. If there is,
where can I find it? Can anyone enlighten me? Thanks a lot.
--
------------------------------
Date: Tue, 16 Dec 1997 08:54:05 +0100
From: "Andrei Ignat" <t-n-g@algonet.se>
Subject: How do I send data to my perl script?
Message-Id: <675c2k$3l1$1@cubacola.tninet.se>
This a quite stupi question but I can't figure it out, what do I write in
the address bar for IE or NN or an <A> tag? I found something like this:
<a
href=3D"http://cgi.algonet.se/htbin/cgiwrap/t-n-g/view_card.pl&CardNumber=1"
>Web</a>
But this don't work, it can't find the document.
/Andrei Ignat ( The New Generation)
http://www.algonet.se/~t-n-g/
------------------------------
Date: 16 Dec 1997 10:15:25 GMT
From: peter.edlund@capgemini.se
Subject: Re: How do I send data to my perl script?
Message-Id: <675kbt$hq1$2@news.capgemini.se>
>This a quite stupi question but I can't figure it out, what do I write in
>the address bar for IE or NN or an <A> tag? I found something like this:
>
><a
>href=3D"http://cgi.algonet.se/htbin/cgiwrap/t-n-g/view_card.pl&CardNumber=1"
>>Web</a>
>
>But this don't work, it can't find the document.
try using a question-mark (?) instead of an ampersand; i.e.
'view_card.pl?CardNumber=1'
that will put CardNumber=1 in QUERY_STRING.
//peter.
--
-------------------------
Peter Edlund
UNIX development engineer
Cap Gemini
peter.edlund@capgemini.se
------------------------------
Date: Tue, 16 Dec 1997 12:38:52 GMT
From: "Dafydd Richards" <dafydd@gwe.co.uk>
Subject: How to stop 'read' from waiting for ever in perl v5.004
Message-Id: <01bbeb4e$4cee6950$0801010a@carnedd>
An example of what I did in perl 5.003
use sigtrap;
$SIG{ALRM}=\&timeup;
...
...
...
...
alarm 3;
cond=1;
while($cond==1) {
read(FILE,$buffer,200);
}
sub timeup {$cond=0}
The point of doing this is that after 3 seconds the alarm breaks the read
and jumps into the loop again with $cond=0 and therefore breaks the loop.
In perl version 5.004 the function 'timeup' seems to return to the 'read'.
Is there anyway in perl 5.004 of breaking the wait on 'read' after a set
time???
Before people start telling me about EOF and all that, I'm not reading a
normal file, it may be a named pipe, or a device etc, even a socket.
Dafydd Richards
------------------------------
Date: 16 Dec 1997 10:10:31 GMT
From: peter.edlund@capgemini.se
Subject: Re: newbie file input question
Message-Id: <675k2n$hq1$1@news.capgemini.se>
>open(INFILE,"./foo.bar") || die "blah blah $!";
>while ($linein = <INFILE>) {
> @line=qw($linein);
> $first=$line[0];
>...
try using split() instead; i.e.
@line = split (/\s+/, $linein);
....
//peter.
--
-------------------------
Peter Edlund
UNIX development engineer
Cap Gemini
peter.edlund@capgemini.se
------------------------------
Date: Mon, 15 Dec 1997 22:29:45 -0200
From: "Sergio Rodrigues Giraldo" <sgiraldo@unisys.com.br>
Subject: Newbie, very newbie
Message-Id: <674i99$q85$1@puma.unisys.com.br>
I just downloaded Perl-Win32 from Activeware and I don't know how to test a
simple Perl script !
I got a script that just print 'HelloWorld' and I don't know how to insert
into my homepage.
The first line in script is #!/usr/bin/perl and I think this is the place
for Perl.Exe. What shoul I put here ?
Further, how i declare the script ? Should I compile it ?
Thanks ...
------------------------------
Date: Tue, 16 Dec 1997 11:09:37 +0000
From: Ed <psyche@dial.pipex.com>
Subject: Pattern Matching .*
Message-Id: <34966171.B77@dial.pipex.com>
Hello,
In the 'Teach yourself Perl' book, the chapter on Pattern Matching
states that the special character .* matches any string (except newline
characters). However it also mentions that this combination tries to
match as much as possible
eg. if the string *banana* is searched using the pattern /b.*a/ ,
*banana* is matched and not *ba* or *bana* .
Anyone know how what special characters to use to match just the first
occurence of the search pattern?
Thanks, Ed.
------------------------------
Date: 16 Dec 1997 12:29:29 +0100
From: Piotr Piatkowski <kompas@galaxy.uci.agh.edu.pl>
Subject: Re: Pattern Matching .*
Message-Id: <675omp$e1d$1@galaxy.uci.agh.edu.pl>
Ed <psyche@dial.pipex.com> wrote:
: Hello,
: In the 'Teach yourself Perl' book, the chapter on Pattern Matching
: states that the special character .* matches any string (except newline
: characters). However it also mentions that this combination tries to
: match as much as possible
: eg. if the string *banana* is searched using the pattern /b.*a/ ,
: *banana* is matched and not *ba* or *bana* .
: Anyone know how what special characters to use to match just the first
: occurence of the search pattern?
Actually, *banana* IS the first occurence of search pattern :-)
But if you're looking for regexp which match as little as possible,
use .*? instead. This will do what you're expecting. Read more about
it in man perlre
--
Piotr Pi1tkowski, Uczelniane Centrum Informatyki, AGH Krakow, POLAND
------------------------------
Date: 16 Dec 1997 12:58:39 GMT
From: Frank Ridderbusch <ridderbusch.pad@sni.de>
Subject: Perl 5.004.04 Binary Package for Siemens Nixdorf RM Systems available
Message-Id: <675ttv$kml$1@news1.teleport.com>
Hi folks,
I've wrapped a PKG package of Perl 5.00404 installable on Siemens
Nixdorf RM200/300/400/600 systems running SINIX/Reliant UNIX 5.42 or
later. You'll find the package in the directory
ftp://ftp.mch.sni.de/sni/mr/pd/perl/perl.5.00404
READMEs describing the packages are also found there.
--
MfG/Regards
Siemens Nixdorf Informationssysteme AG
/==== Abt.: LoB OEC HES QM4
/ Ridderbusch / , Heinz Nixdorf Ring
/ /./ 33106 Paderborn, Germany
/=== /,== ,===/ /,==, // Tel.: (49) 05251-8-15211
/ // / / // / / \ NERV: ridderbusch.pad
/ / `==/\ / / / \ Email: ridderbusch.pad@sni.de
Since I have taken all the Gates out of my computer, it finally works!!
------------------------------
Date: 16 Dec 1997 09:24:05 GMT
From: peter.edlund@capgemini.se
Subject: Re: Perl Installation on SUN Netra i
Message-Id: <675hbl$g84$2@news.capgemini.se>
if you have a SUN workshop compiler, you can compile perl on that, otherwise the easiest would problaby be to pick up a binary release of Gnu c.
try http://smc.vnet.net for binary releases for Solaris
//peter.
>
> Perl Installation on SUN Netra i
>
> From: ymisdn@pc.jaring.my (Y M Tan)
> Reply to: ymtan@pc.jaring.my
> Date: Tue, 16 Dec 1997 02:03:36 GMT
> Organization: Unconfigured
> Newsgroups:
> comp.lang.perl.misc,
> jaring.pcbase
> Followup to: newsgroup(s)
>
>Hi there,
>
>Greetings!
>
>Can someone kindly enlight me on installing Perl on Sun Netra i
>machine running Solaris 2.5.1?
>
>I was told that I have to install GNU C/C++ compiler and get the Perl
>source for compilation. However, I am quite at loss at the 1st step.
>
>Will appreciate very much if you can share your experience.
>Thank you very much.
>
>
>Best regards,
>Y M Tan
--
-------------------------
Peter Edlund
UNIX development engineer
Cap Gemini
peter.edlund@capgemini.se
------------------------------
Date: Tue, 16 Dec 1997 06:06:31 -0500
From: Dan <dan@webhse.com>
Subject: Perl script for form processing
Message-Id: <349660B7.5D56@webhse.com>
I am looking for a perl script to send the filled out form from a
website to an appendable comma delimited text file.
Can anyone HELP?
Dan
--
Daniel P. Kerning
WebHouse Inc.
http://www.webhse.com/
webhouse@webhse.com
------------------------------
Date: 16 Dec 1997 10:17:39 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: perldb: Undefined subroutine &Carp::longmess
Message-Id: <675kg3$4vb$1@agate.berkeley.edu>
In article <m367opsux1.fsf@pobox.com>, Karl Anderson <kra@pobox.com> wrote:
>
> I am having problems using the perl debugger. I get the error:
>
> Undefined subroutine &Carp::longmess called at /usr/lib/perl5/perl5db.pl line 1361.
>
> The error occurs in code from libwww-perl-0.40 (yes, I know it's
> ancient), specifically, stepping into 'require "wwwhttp.pl"', line 38,
> will do it. Running perldb on wwwhttp.pl doesn't generate an error.
>
> My /usr/lib/perl5/perl5db.pl is requiring carp, & carp is supplying
> longmess, so I don't see the problem. Both files came from the
> perl-5.003-8 rpm (red hat package), & both verify fine with rpm -V.
Which is pretty old, upgrade. Though I do not remember this
particular problem. You can always put -MCarp on the debugger line
(though it may happen that your ancient Perl does not support it.)
Ilya
------------------------------
Date: Tue, 16 Dec 1997 15:35:42 +0200
From: Moshe Dorner <moe1@netvision.net.il>
Subject: Really newbie question
Message-Id: <349683AE.8A4842E4@netvision.net.il>
To the group,
I just started fooling around with CGIs in perl and I wanteed to
know how do I call a script from my HTML file ?
I have a simple counter script I wrote the works fine but when I try
to integrate it with my html it doesn't work. Any ideas ?
------------------------------
Date: Tue, 16 Dec 1997 12:57:47 GMT
From: lg@kt.dtu.dk (Lars Gregersen)
Subject: Re: recursive regex?
Message-Id: <349679e2.87665450@130.228.3.8>
[posted and mailed]
On 11 Dec 1997 02:03:10 GMT, coleman@library.ucsf.edu (Gregory
Coleman) wrote:
>Basically, I just want to go through a file system, and look at each level of directories and scan for something. For example, say I have user's home directories, and I am getting ready to change the path to perl. I want to know who all has "#!/usr/local/bin/perl" so that I might later change it.
You can use the find programme in Unix, but if you head is put
together like mine you will find it too complicated to use.
I've put a small programme Findgrep together in Perl that uses the
File::Find module. Findgrep will do what you want it works under
windows and is free.
You can get it at:
http://www.gbar.dtu.dk/~matlg/findgrep/
Mail me if you find bugs or need more functionality.
Lars
Lars Gregersen, M.Sc., Chem. Engng.
Technical University of Denmark
Department of Chemical Engineering
E-mail : lg@kt.dtu.dk
Homepage: http://www.gbar.dtu.dk/~matlg/
------------------------------
Date: Tue, 16 Dec 1997 03:21:57 -0500
From: "Tarik Alkasab" <talkasab@opal.tufts.edu>
Subject: Re: Teaching programing
Message-Id: <675dr3$vsf$1@news3.tufts.edu>
Janos Blazi <jblazi@wuerzburg.netsurf.de> wrote:
> I have to teach programing to 15-years old pupils. Is PERL a good language
> to start with? Our "authorities" seem to prefer PASCAL, but PASCAL seems
> to be absolutely dead and the first steps in PERL are perhaps easier than
> the first steps in C. Or should I take BASIC (oh horror!)?
>
People have made many useful comments about features of Perl that make it
less than appropriate for teaching beginning programming (lack of enforced
structure, lack of typed variables, etc.) I respect these comments; if you
want your students to really understand programming, then languages which
stress such discipline make better sense than Perl.
However, there are two things about Perl which might make it a good language
to teach beginners in certain circumstances.
(1) It's easy to get things done in Perl. Even beginners can think through
a solutions to a problem, and then write non-elegant but functional
implementations. (Really, isn't this why *most* of us use Perl?)
(2) Perl might be an appropriate tool for something your students actually
want to *do*. For example, my wife knew essentially *no* programming, and
wasn't particuarly interested in it. But she wanted to create a particular
CGI application, and I taught her the basics of Perl so that she could make
it herself. Because her learning was motivated by her own project, she was
much more focused than she might otherwise have been.
So if your students don't know any programming, but might have a project
that they would be excited by which would be most effectively pursued in
Perl, then why not teach the tools they need to achieve their goals? They
might not learn much computer science theory, but you might be able to get
much more across to them.
Just my thoughts.
Terry
------------------------------
Date: 16 Dec 1997 08:40:31 GMT
From: ? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au>
Subject: Re: Teaching programing
Message-Id: <882261631.337683@cabal>
In <67082l$jb5@news1.citylink.de> "Janos Blazi" <jblazi@wuerzburg.netsurf.de> writes:
>I have to teach programing to 15-years old pupils. Is PERL a good language
>to start with? Our "authorities" seem to prefer PASCAL, but PASCAL seems to
>be absolutely dead
Pascal was never meant to be used for anything usefull. Its primery
perpose was as a teaching languge. I found that one you have nearned
Pascal you can quickly pick up C or Perl.
> and the first steps in PERL are perhaps easier than the
>first steps in C.
While a few weeks ago I was argueing that Perl was a dreadfull learning
langwige, I have had some what of a demositic experence. The persence of
a garbige collector and the diagnostics.pm module both aid the new
learner. Plus the persence of good books and the on line manule.
> Or should I take BASIC (oh horror!)?
No No No, the learning of Basic taints the mind and deseases the
interlect. Teaching somebody basic is a step backwards on the path of good
programing practice.
--
Please excuse my spelling as I suffer from agraphia see the url in my header.
Never trust a country with more peaple then sheep. I do not reply to mungged
Support NoCeM http://www.cm.org/ addresses.
I'm sorry but I just don't consider 'because its yucky' a convincing argument
------------------------------
Date: Tue, 16 Dec 1997 23:15:58 +1100
From: Anthony David <adavid@netinfo.com.au>
Subject: Re: Teaching programing
Message-Id: <349670FE.4B89E8C9@netinfo.com.au>
Randal Schwartz wrote:
> >>>>> "Anthony" == Anthony David <adavid@netinfo.com.au> writes:
>
> Anthony> The language does not get in the way of what I want to do and
> Anthony> how I want to express it (I'm sure there are exceptions!!).
>
> In fact, some argue that "Exceptions" are one of those exceptions.
>
> :-)
>
Ahah! So Perl was inspired by "Cosmic Encounter".
> I agree with most of adavid's comments... I was stuck in BASIC-land
> for the first six years of my hacking, although I had learned FOCAL on
> paper before that, and hacked my HP-41C a bit. (I'm probably dating
> myself here... but if I don't, who will? :-)
HP41-C..I used drool over them in the Uni shop. Whoops. dated myself too :-)
> And for OO, I'd recommend Smalltalk. There are public implementations
> out there ("Squeak" even fits the Blue Book smalltalk very closely),
> and it's really pure OO, unlike that C++ abomination or the Java
> half-breed. Sure, the real market never took off on Smalltalk, but
> once you get it down, learning how half-object solutions like Perl and
> Java works becomes much easier (and then you start wishing that
> everything was an object instead of just the higher life forms :-).
>
Excellent point. I had never had any OO experiences until my firstDBI-CGI program,
but from my readings, and discussions with others,
Smalltalk is to Objects as Pascal is to Structured Design.
--
Anthony David | Opinions expressed ARE
Anthony David & Associates | those of my employer
------------------------------
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 1481
**************************************