[6269] in Perl-Users-Digest
Perl-Users Digest, Issue: 891 Volume: 7
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Feb 4 09:17:19 1997
Date: Tue, 4 Feb 97 06:00:23 -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, 4 Feb 1997 Volume: 7 Number: 891
Today's topics:
ANNOUNCE: Math::MatrixReal 1.1 (Steffen Beyer)
ANNOUNCE: Set-IntegerFast bundle 3.2 (Steffen Beyer)
C-Routines from Perl <ob@online.neurotec.de>
Re: C-Routines from Perl (Mike Stok)
Re: C-Routines from Perl <seay@absyss.fr>
Re: Commercial success stories using perl. (Bennett Todd)
converting date/time to seconds as in the time function <nathan@club.innet.be>
Re: converting date/time to seconds as in the time func (Kjetil Skotheim)
Re: converting date/time to seconds as in the time func <seay@absyss.fr>
flock() question <nathan@club.innet.be>
Re: Here document.. here... Good boy <dbenhur@emarket.com>
Re: How do I strip out all characters including newline (Jeffrey)
Re: Inverse Letters (Paul Sisson)
Re: Large Project Code Organization (Bennett Todd)
nt perl question <hbui@hmc.edu>
NT perl, system() and html output (Daniel Donghoon Paik)
Re: Obtaining exit status of executed program <domi@marlis.grenoble.hp.com>
Re: perl and linux?? <Jim-and-Francine-Chapman@worldnet.att.net>
Re: Perl cgi discussion groups <tchrist@mox.perl.com>
Re: Wanted: perl telnet examples (Mike Stok)
Digest Administrivia (Last modified: 8 Jan 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 4 Feb 1997 11:47:55 GMT
From: sb@sdm.de (Steffen Beyer)
Subject: ANNOUNCE: Math::MatrixReal 1.1
Message-Id: <5d77lb$muf@sunti1.sdm.de>
I am glad to present
========================================
Module "Math-MatrixReal" Version 1.1
========================================
to the Perl community.
Contents of this message:
-------------------------
- Legal stuff
- Requirements
- What does it do
- Version history
- Plans for the future
- Credits
- Where to find
- Final note
Legal stuff:
------------
Copyright (c) 1996, 1997 by Steffen Beyer. All rights reserved.
This package is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
Requirements:
-------------
Perl version 5.000 or higher capable of "overloading" (overload.pm).
What does it do:
----------------
Math::MatrixReal - Matrix of Reals
Implements the data type "matrix of reals" (and consequently also
"vector of reals") which can be used almost like any other basic
Perl type thanks to OPERATOR OVERLOADING, i.e.,
$product = $matrix1 * $matrix2;
does what you would like it to do (a matrix multiplication).
Also features many important operations and methods: matrix norm,
matrix transposition, matrix inverse, determinant of a matrix, order
and numerical condition of a matrix, scalar product of vectors, vector
product of vectors, vector length, projection of row and column vectors,
a comfortable way for reading in a matrix from a file, the keyboard or
your code, and many more.
Allows to solve linear equation systems using an efficient algorithm
known as "L-R-decomposition" and several approximative (iterative) methods.
Features an implementation of Kleene's algorithm to compute the minimal
costs for all paths in a graph with weighted edges (the "weights" being
the costs associated with each edge).
Version history:
----------------
Version 1.0 was the initial release.
Version 1.1 fixes a bug in the "kleene()" method.
Plans for the future:
---------------------
Define test cases (which is not trivial since results will depend on the
local implementation of floating point arithmetics on a given machine!).
Compute the characteristic polynom, eigenvalues and eigenvectors,
orthogonal matrices, ...
Deal with symmetric and with orthogonal matrices, multilinear functions, ...
Create a module "Math::MatrixCplx" to deal with matrices of complex numbers...
Deal with hermite matrices, multilinear functions, ...
Credits:
--------
None yet except - as always - to Andreas Koenig <andreas.koenig@mind.de>
for his relentless support and efforts as upload manager of the CPAN!
Where to find:
--------------
At the usual ftp sites for Perl (CPAN = "Comprehensive Perl Archive Network"):
The file
Math-MatrixReal-1.1.tar.gz
can be found in directory
.../CPAN/authors/id/STBEY/
or
.../CPAN/modules/by-category/06_Data_Type_Utilities/Math/
or
.../CPAN/modules/by-module/Math/
(See "The Perl 5 Module List" by Tim Bunce and Andreas Koenig
in news:comp.lang.perl.modules for a list of CPAN ftp servers)
Final note:
-----------
If you need any assistance or have any comments, problems, suggestions,
findings, complaints, questions, insights, compliments or donations to give ;-)
then please don't hesitate to send me a mail:
sb@sdm.de (Steffen Beyer)
In fact I'd be glad if you could drop me an e-mail when you are using this
package, so I can see how much interest exists in it and how much time is
reasonable to spend on its further development.
Therefore, I would also be glad to know what you liked and what you disliked
about this package!
And I would also be very interested to know what your application is in
which you found this package to be useful, just to get an idea what can
all be done with it and in which direction it should be developed further.
Many thanks in advance!!
With kind regards,
--
|s |d &|m | Steffen Beyer <sb@sdm.de> (+49 89) 63812-244 fax -150
| | | | software design & management GmbH & Co. KG
| | | | Thomas-Dehler-Str. 27, 81737 Munich, Germany.
------------------------------
Date: 4 Feb 1997 11:51:10 GMT
From: sb@sdm.de (Steffen Beyer)
Subject: ANNOUNCE: Set-IntegerFast bundle 3.2
Message-Id: <5d77re$nbl@sunti1.sdm.de>
I am glad to announce
=========================================
Package "Set-IntegerFast" Version 3.2
=========================================
to the Perl community.
Contents of this message:
-------------------------
- What's new?
- Legal stuff
- Features
- Requirements
- What does it do
- Credits
- Where to find
- Final note
What's new?
-----------
Four new methods have been added to the "Set::IntegerFast" module:
The first three methods fill the gap between setting or clearing either
*all* elements in a set at once or a *single* element at a time: it is now
possible to clear, set and flip a whole *interval* of elements (of arbitrary
size, as long as it will fit into the set as a whole) all at once!
Their names and usages are:
- $set->Empty_Interval($lower,$upper);
- $set->Fill_Interval($lower,$upper);
- $set->Flip_Interval($lower,$upper);
(the interval always includes both limits, "$lower" and "$upper")
This makes it easy to translate runs of integers as used by the "newsrc"
file format (for example 1-3382,3384,3386-3388) into sets of this package,
for instance.
There is also a new "$set->Size()" method which returns the size a given
set has been created with (or "Resize()"d to).
The same four methods have been added to the "Set::IntegerRange" module in
an analog fashion (see the man page).
The "Math::MatrixBool" module has been significantly improved through a
C library (linked to Perl via the XSUB interface) that handles matrix
multiplication and the calculation of a matrix's closure (Kleene's
algorithm).
The module now also offers a "new_from_string()" method just like the
"Math::MatrixReal" module.
Moreover, it has been equipped with a "Dim()" (dimensions) method which
the "Math::MatrixReal" module also already had and which I simply forgot
to implement in the previous version.
A severe bug was fixed in the "kleene()" method of the "Math::MatrixReal"
module.
Legal stuff:
------------
Copyright (c) 1995, 1996, 1997 by Steffen Beyer. All rights reserved.
This package is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
Features:
---------
* "lib_set.c":
+ efficient (fast) handling of bit vectors and set operations,
auto-configuring for using machine word as basic storage unit
(most efficient!)
(C library, completely independent of Perl)
* "Set::IntegerFast":
+ efficient (fast) object-oriented methods for handling sets
of integers (intervals from zero to some positive integer)
(Perl XSUBs in C, uses "lib_set.c")
* "Set::IntegerRange":
+ object-oriented methods for handling sets of integers
(arbitrary intervals)
(in Perl, uses "Set::IntegerFast")
+ overloaded arithmetic and relational operators
for still more ease of use
(in Perl, uses first part of "Set::IntegerRange")
* "Math::MatrixBool":
+ object-oriented methods for handling matrices of booleans
(Boolean Algebra)
(in Perl, uses "Set::IntegerFast")
+ overloaded arithmetic and relational operators
for still more ease of use
(in Perl, uses first part of "Math::MatrixBool")
+ computes reflexive transitive closure using Kleene's
algorithm (essential for solving path-problem in graphs)
+ this is mainly an example application to help you build
your own (using "Set::IntegerFast")
* "Math::MatrixReal":
+ object-oriented methods for handling matrices of reals
(for demonstration purposes only)
(in Perl, independent stand-alone module)
+ overloaded arithmetic and relational operators
allow you to use this data type (almost) like
any other built-in Perl data type
+ features another implementation of Kleene's algorithm to
compute the minimal costs for all paths in a graph with
weighted edges (the "weights" being the costs associated
with each edge)
+ allows to solve linear equation systems using an efficient
algorithm known as "L-R-decomposition" and several approxi-
mative (iterative) methods
+ allows you to convert a matrix into a string (in a nice,
human-readable format) and to read it back in later (for
instance from a file!), or using the shell-like "here-
document" syntax (among other possibilities):
$matrix = Math::MatrixReal->new_from_string(<<"MATRIX");
[ 3 2 0 ]
[ 0 3 2 ]
[ $c1 $c2 $c3 ]
MATRIX
* "DFA::Kleene":
+ still another implementation of Kleene's algorithm to compute
the language accepted by a Deterministic Finite Automaton
(for demonstration purposes only)
(in Perl, independent stand-alone module)
* "Graph::Kruskal":
+ implementation of Kruskal's efficient algorithm for Minimal
Spanning Trees in graphs in O( n * ld(n) )
(for demonstration purposes only)
(in Perl, independent stand-alone module)
+ example of an algorithm relying heavily on sets which uses
a different (fascinating!) representation for sets than the
"Set::IntegerFast" module (see the Graph::Kruskal(3) man page!)
* "Kleene.pod":
+ a short introduction into the theory behind Kleene's algorithm
Requirements:
-------------
Perl version 5.000 or higher, a C compiler capable of the ANSI C standard (!)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
What does it do:
----------------
The base module of this package, "Set::IntegerFast", allows you to create
sets of arbitrary size (only limited by the size of a machine word and avai-
lable memory on your system) of an interval of positive integers starting
with zero, to dynamically change the size of such sets and to perform all
the basic operations for sets on them, like
- adding or removing elements,
- testing for the presence of a certain element,
- computing the union, intersection, difference, symmetric difference or
complement of sets,
- copying sets,
- testing two sets for equality or inclusion, and
- computing the minimum, the maximum and the norm (number of elements) of
a set.
Note that it is extremely easy to implement sets of arbitrary intervals
of integers using this module (negative indices are no obstacle), despite
the fact that only intervals of positive integers (from zero to some posi-
tive integer) are supported directly.
Please refer to the Set::IntegerFast(3) man page and the "Set::IntegerRange"
module to see how this can be done!
The module is mainly intended for mathematical or algorithmical computa-
tions. There are also a number of efficient algorithms that rely on sets.
An example of such an efficient algorithm (which uses a different repre-
sentation for sets than this module, however) is Kruskal's algorithm for
minimal spanning trees in graphs. (That algorithm is included in this dis-
tribution as a Perl module for those interested. Please refer to the
Graph::Kruskal(3) man page for more details!)
Another famous algorithm using sets is the "Seave of Erathostenes" for
calculating prime numbers, which is included here as a demo program
(see "Set/primes.pl").
An important field of application is the computation of "first", "follow"
and "look-ahead" character sets for the construction of LL, SLR, LR and LALR
parsers for compilers (or a compiler-compiler, like "yacc", for instance).
(That's what the C library in this package was initially written for)
(See Aho, Hopcroft, Ullman, "The Design and Analysis of Computer Algorithms"
for an excellent book on efficient algorithms and the famous "Dragon Book"
on how to build compilers by Aho, Sethi, Ullman)
Therefore, this module is primarily designed for efficiency and not for a
comfortable user interface (the latter can be added by additional modules,
as shown by the "Set::IntegerRange" and "Math::MatrixBool" modules).
It only offers a basic functionality and leaves it up to your application
to add whatever special handling it needs (for example, negative indices
can be realized by biasing the whole range with an offset).
(Please refer to the "Set::IntegerRange" module in this package to see how!)
Sets in this module are implemented as bit vectors, and elements are positive
integers from zero to the maximum number of elements (which you specify when
creating the set) minus one.
Each element (i.e., number or "index") thus corresponds to one bit in the
bit array. Bit number 0 of word number 0 corresponds to element number 0,
element number 1 corresponds to bit number 1 of word number 0, and so on.
The module doesn't use bytes as basic storage unit, it rather uses machine
words, assuming that a machine word is the most efficiently handled size of
all scalar types on any machine (that's what the C standard proposes and
assumes anyway).
In order to achieve this, it automatically determines the number of bits
in a machine word on your system and then adjusts its internal constants
accordingly.
The greater the size of this basic storage unit, the better the complexity
of the methods in this module (but also the greater the average waste of
unused bits in the last word).
See the section on COMPLEXITY in the Set::IntegerFast(3) man page for an
overview of the complexity of each method!
Note that the C library in this package ("lib_set.c") is designed in such
a way that it may be used independently from Perl and this Perl extension
module. (!)
For this, you can use the file "lib_set.o" exactly as it is produced when
building this module! It contains no references to Perl, and it doesn't need
any Perl header files in order to compile. (It only needs "lib_defs.h" and
some system header files)
Note however that this C library does not perform any bounds checking
whatsoever! (This is left to your application!)
(See the corresponding explanation in the file "lib_set.c" for more details
and the file "IntegerFast.xs" for an example of how this can be done!)
In this module, all bounds and type checking (which should be absolutely
fool-proof, by the way!) is done in the XS subroutines.
For more details on the modules in this package, please refer to their
respective man pages!
Credits:
--------
Many thanks to Ralf S. Engelschall <rse@engelschall.com> for suggesting the
four new methods implemented in version 3.0 of the "Set::IntegerFast" (and
also in the "Set::IntegerRange") module! (= distribution version 3.2)
Where to find:
--------------
At the usual ftp sites for Perl (CPAN = "Comprehensive Perl Archive Network"):
The file
Set-IntegerFast-3.2.tar.gz
can be found in directory
.../CPAN/authors/id/STBEY/
or
.../CPAN/modules/by-category/06_Data_Type_Utilities/Set/
or
.../CPAN/modules/by-module/Set/
(See "The Perl 5 Module List" by Tim Bunce and Andreas Koenig
in news:comp.lang.perl.modules for a list of CPAN ftp servers)
Final note:
-----------
If you need any assistance or have any comments, problems, suggestions,
findings, complaints, questions, insights, compliments or donations to give ;-)
then please don't hesitate to send me a mail:
sb@sdm.de (Steffen Beyer)
In fact I'd be glad if you could drop me an e-mail when you are using this
package, so I can see how much interest exists in it and how much time is
reasonable to spend on its further development.
Therefore, I would also be glad to know what you liked and what you disliked
about this package!
And I would also be very interested to know what your application is in
which you found this package to be useful, just to get an idea what can
all be done with it and in which direction it should be developed further.
Many thanks in advance!!
With kind regards,
--
|s |d &|m | Steffen Beyer <sb@sdm.de> (+49 89) 63812-244 fax -150
| | | | software design & management GmbH & Co. KG
| | | | Thomas-Dehler-Str. 27, 81737 Munich, Germany.
------------------------------
Date: 4 Feb 1997 08:58:48 GMT
From: "Oliver Belikan" <ob@online.neurotec.de>
Subject: C-Routines from Perl
Message-Id: <01bc127a$6f277c20$7d64a8c0@OliverB.intern.online.neurotec.de>
Is it possible to call C-functions from Perl ?
How ?
------------------------------
Date: 4 Feb 1997 12:21:21 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: C-Routines from Perl
Message-Id: <5d79k1$9dr@news-central.tiac.net>
In article <01bc127a$6f277c20$7d64a8c0@OliverB.intern.online.neurotec.de>,
Oliver Belikan <ob@online.neurotec.de> wrote:
>Is it possible to call C-functions from Perl ?
>How ?
Yes it is, and the method you use depends on whether you're using perl 4
or 5. If you're using perl 4 then you need to look in the usub directory
of the distribition and see how a perl executable can be bbuild with calls
to curses library routines.
Perl 5 has a much more flexible extension meachanism, the manual pages
supplied with recent perl 5 include
perlembed Perl how to embed perl in your C or C++ app
perlapio Perl internal IO abstraction interface
perlxs Perl XS application programming interface
perlxstut Perl XS tutorial
perlguts Perl internal functions for those doing extensions
perlcall Perl calling conventions from C
and there are some CookBook examples on the Comprehensive Perl Archive
Network under CPAN/authors/Dean_Roehrich/ which might be useful too.
You can get to CPAN by ftp to ftp.funet.fi and look in
/pub/languages/perl/CPAN for a list of sites mirroring it, or use Tom's
multiplexor at http://www.perl.com/CPAN/
Hope this helps,
Mike
--
mike@stok.co.uk | The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/ | PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/ | 65 F3 3F 1D 27 22 B7 41
stok@psa.pencom.com | Pencom Systems Administration (work)
------------------------------
Date: Tue, 04 Feb 1997 14:06:53 +0000
From: Douglas SEAY <seay@absyss.fr>
To: Oliver Belikan <ob@online.neurotec.de>
Subject: Re: C-Routines from Perl
Message-Id: <32F7427D.33A9@absyss.fr>
Oliver Belikan wrote:
>
> Is it possible to call C-functions from Perl ?
yes
> How ?
use the XS stuff, try the following man pages
perlxs Perl XS application programming interface
perlxstut Perl XS tutorial
doug seay
seay@absyss.fr
------------------------------
Date: Tue, 4 Feb 1997 13:16:04 GMT
From: bet@nospam.interactive.net (Bennett Todd)
Subject: Re: Commercial success stories using perl.
Message-Id: <slrn5fedkj.qvf.bet@onyx.interactive.net>
On Fri, 31 Jan 1997 09:26:07 +0000, Steve Vanechanos <stevev@dynamicweb.com> wrote:
>I am looking for significant commercial success stories where perl is
>being used.
They're easy to find, though how you'd go about documenting them (getting
permission to get the tales released, and getting references) I'm not sure.
Most Wall Street firms have fairly substantial amounts of systems code in perl
these days, and it's the preferred language for new systems development. It's
even starting to draw interest for applications development, joy!
The thing is, though, there are two different "commercial" or "business"
environments, that may seem similar on the surface, but that diametrically
opposite motivations. Unsurprisingly they come up with different answers.
In both cases, the issue revolves around "support".
Some people define "support" as "something you can pay a company to promise
to deliver, so you can blame them when they don't". For these folks Perl is
unacceptable; they aren't looking for, or interested in, tools to get jobs
done, they are looking for brand names that will lead to project failures that
cannot be blamed on the people who chose the products. Thus the popularity,
in some circles, of NT, Visual Basic, and other such paragons of software
engineering. If you have that sort of pointy-haired boss, then don't bother
trying to sell perl, it's not very useful as a place to plant blame for failed
projects.
There are other people, though, who are interested in having projects succeed;
for them, support means something more like what we're accustomed to ---
someone can fix it if it breaks. They have been using perl for years.
-Bennett
------------------------------
Date: Tue, 04 Feb 1997 11:21:18 +0100
From: Fabian Thylmann <nathan@club.innet.be>
Subject: converting date/time to seconds as in the time function
Message-Id: <32F70D9E.7A9@club.innet.be>
hi..
I would like to know how I should convert a date/time I get from a log
file into the format given by the function 'time' (seconds elapsed since
1.1.1970, I think)
--
- Fabian Thylmann <aka NaTHaN>
Mindleak - We'll design your first Web-Page for FREE!
Check our Home-Page: http://www.binary.net/mindleak
Personal Home-Page: http://www.dragonfire.net/~nathan
------------------------------
Date: 4 Feb 1997 11:49:19 GMT
From: kjetil.skotheim@usit.uio.no (Kjetil Skotheim)
Subject: Re: converting date/time to seconds as in the time function
Message-Id: <5d77nv$f4h@ratatosk.uio.no>
In article <32F70D9E.7A9@club.innet.be>, nathan@club.innet.be says...
>I would like to know how I should convert a date/time I get from a log
>file into the format given by the function 'time' (seconds elapsed since
>1.1.1970, I think)
>
>- Fabian Thylmann <aka NaTHaN>
If using perl5:
use the timelocal() function in the Time::Local module
If using perl4:
use the timelocal() function in the timelocal.pl package
timelocal is the oposite of localtime, which is built-in.
------------------------------
Date: Tue, 04 Feb 1997 14:10:04 +0000
From: Douglas SEAY <seay@absyss.fr>
To: nathan@club.innet.be
Subject: Re: converting date/time to seconds as in the time function
Message-Id: <32F7433C.22D4@absyss.fr>
Fabian Thylmann wrote:
>
> hi..
>
> I would like to know how I should convert a date/time I get from a log
> file into the format given by the function 'time' (seconds elapsed since
> 1.1.1970, I think)
what format is your date/time that you are getting from this log?
can you parse it into day, month, year, seconds, and so on?
if so, look in your perl library for the timelocal.pl that
came with the perl distribution. it should do what you want.
doug seay
seay@absyss.fr
------------------------------
Date: Tue, 04 Feb 1997 11:09:34 +0100
From: Fabian Thylmann <nathan@club.innet.be>
Subject: flock() question
Message-Id: <32F70ADE.1851@club.innet.be>
Hi...
I use flock in a lot of my scripts and am getting a little confused. The
way I understood it, when you use flock(FILE,2); it will lock the file
and when you use flock(FILE,8); it will unlock it. Now I also thought
that when someone comes along and used flock(FILE,2); AGAIN on the same
file and the first script didn't unlock it yet, the second script will
automatically sleep until it can gain a lock on the file. Is this
correct, or not?
TIA,
--
- Fabian Thylmann <aka NaTHaN>
Mindleak - We'll design your first Web-Page for FREE!
Check our Home-Page: http://www.binary.net/mindleak
Personal Home-Page: http://www.dragonfire.net/~nathan
------------------------------
Date: Mon, 03 Feb 1997 23:52:49 -0800
From: Devin Ben-Hur <dbenhur@emarket.com>
To: Daniel DuBois <dan@spyglass.com>
Subject: Re: Here document.. here... Good boy
Message-Id: <32F6EAD1.2404@emarket.com>
Daniel DuBois wrote:
> print STDOUT <<'EndOfHtml';
> [some stuff snipped]
> EndOfHtml
>
> And I get a:
> cgi-bin 49>perl -c -w SampsonReg.pl
> Can't find string terminator "EndOfHtml" anywhere before EOF at
> SampsonReg.pl line 122.
What you have works fine for me. However, if you have extra whitespace
at the end of the 'EndOfHtml' line you'll get the message you got.
Here-docs look for the termination string and nothing but the
termination string.
--
Devin Ben-Hur <dbenhur@emarket.com>
eMarketing, Inc. http://www.emarket.com/
"Don't run away. We are your friends." O-
------------------------------
Date: 04 Feb 1997 05:51:30 GMT
From: jfriedl@tubby.nff.ncl.omron.co.jp (Jeffrey)
To: Mark Rayson <M.J.Rayson@durham.ac.uk>
Subject: Re: How do I strip out all characters including newlines?
Message-Id: <JFRIEDL.97Feb4145130@tubby.nff.ncl.omron.co.jp>
[mail and post]
Mark Rayson <M.J.Rayson@durham.ac.uk> wrote:
|> > I want to strip out everything in a string from </a> to <a>, but I
|> > can't, a problem I assume with newlines (i.e. s#</a>.*#<a># won't
|>
|> The . matches any character EXCEPT a new line. So you have to use
|> something like s#</a>[.|\n]*#<a>#
Uh, this is not at all what the guy wants to do.
DOT (and OR) are not valid within a character class, so [.|\n] will match
one of three characters: period, vertical bar, newline.
The guy probably wants something along the lines of
s#</a>.*?<a>##s
Of course, you'd have to make sure that the entire target string is, well,
the target string.
(Also tote that this can't possibly work for HTML -- if HTML is the target,
you'd need something differnet.)
Jeffrey
----------------------------------------------------------------------------
Jeffrey Friedl <jfriedl@omron.co.jp> Omron Corp, Nagaokakyo, Kyoto 617 Japan
O'Reilly & Associates' _Mastering Regular Expressions_
http://enterprise.ic.gc.ca/~jfriedl/regex/
------------------------------
Date: Mon, 03 Feb 1997 23:00:15 -0700
From: psisson@smartlink.net (Paul Sisson)
Subject: Re: Inverse Letters
Message-Id: <psisson-ya023080000302972300160001@news.smartlink.net>
In article <5d3f1t$el@news.wco.com>, Steve Johnson <stevej@wco.com> wrote:
>How do I print inverse letters in a print statement?
Try these functions:
# clear screen
sub CLS { print "\e[;H\e[2J"; }
# inverse screen
sub INVERSE { print "\e[7m"; }
# normal screen
sub NORMAL { print "\e[0m"; }
Hope this helps.
-Paul Sisson
------------------------------
Date: Tue, 4 Feb 1997 12:11:22 GMT
From: bet@nospam.interactive.net (Bennett Todd)
Subject: Re: Large Project Code Organization
Message-Id: <slrn5fe9r9.o62.bet@onyx.interactive.net>
One approach that has worked well for me, on a medium-sized job, was to bust
it into chunks each small enough so that one individual could work on it, then
turn 'em loose. Besides documenting the interfaces between the chunks I also
found I had to write interface validation test drivers and stubs. But once I'd
done that, the development proceeded fine, and the pieces came together and
worked.
-Bennett
------------------------------
Date: Mon, 03 Feb 1997 23:16:43 -0800
From: Hieu Bui <hbui@hmc.edu>
Subject: nt perl question
Message-Id: <32F6E25B.6DDF@hmc.edu>
Hi, I have Perl 5.001 build 110 for NT and am experiencing a weird
problem. The usual:
$file = ".\\data\\file.txt";
open (HANDLE, ">>$file")
does not seem to be working since I can't append to the file. Is their
something weird going on? I've tried to find an answer but haven't been
able to for the last hour.
Email responses would be greatly appreciated. Thanks.
Hieu Bui
hbui@hmc.edu
------------------------------
Date: 4 Feb 1997 07:03:08 GMT
From: uctt@uclink.berkeley.edu (Daniel Donghoon Paik)
Subject: NT perl, system() and html output
Message-Id: <5d6mvc$jcm@agate.berkeley.edu>
hi all,
i wrote a perl script for a form in html. i am using the system()
function to call dos exe programs. my problem is that that output of
these system calls shows up on the screen. for example, if i do
system("copy myfile.doc myfile2.doc"); then on my html page i will get a
"1 file(s) copied" on the screen. how do i "suppress" the output of these
system calls? thanks!
Dan.
--
-------------------------------------------
Daniel Paik http://www.trilli.com/uctt
UC Berkeley '96, Seoul International School '91
UCTT #11, Lambda Phi Epsilon Delta Chapter Eta Class
------------------------------
Date: 04 Feb 1997 09:59:47 +0100
From: Dominique Dumont <domi@marlis.grenoble.hp.com>
Subject: Re: Obtaining exit status of executed program
Message-Id: <vkzvi897xq4.fsf@marlis.grenoble.hp.com>
> |> I'm using a statement similar to:
> |> open FILEH, "myprogram";
> |>
> |> and I'd like to get the exit code of the
> |> program, which is in the stored as $status in the
> |> environment, but is not accessible if I try to use the $ENV{'status'} or
> |> $ENV{'STATUS'} constructs.
See "system" command in perlfunc man page.
--
Dominique_Dumont@grenoble.hp.com
------------------------------
Date: Mon, 03 Feb 1997 22:59:42 -0800
From: James Chapman <Jim-and-Francine-Chapman@worldnet.att.net>
Subject: Re: perl and linux??
Message-Id: <32F6DE5E.4914@worldnet.att.net>
plan9@inetworld.net wrote:
>
> is it possible to run perl thru linux? I ask because I don't have
> access to a shell that offers access to /usr/bin/perl and thus i'm
> screwed if I ever wanna learn how to program in perl ( which I really
> want to do), So as I see it I can instal FreeBSD ( which is what my
> server runs ( I know that it will run perl) or install Linux ( the
> more favorable option). Can someone enlighten me here please?
>
I would be extremely surprised if any current Linux distribution didn't
come with Perl integrated into the basic package. I have installed 4
versions
of Linux over the last couple of years (2 Slakware, 2 Redhat). They
all came with Perl. I am now using Redhat 4.0. It comes with Perl
5.03.
------------------------------
Date: 4 Feb 1997 11:43:59 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Perl cgi discussion groups
Message-Id: <5d77dv$ml1$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
"nancy" <nbuczek@hotmail.com> writes:
:Hello, I'm a mom who has done enough website work to know that my husband
:is usless in helping me with my latest goal for a Mother's Center web page.
: I have a service that supports Perl v4 and I want to set up a cgi
:discussion group so that mother's can ask questions and other mother's can
:answer them. if anyone out there can make this task easy for me or point
:me in the direction towards this accomplishment I would greatly appreciate
:it.
1) Get them to install v5 perl. We're at v5.003 right now production,
v5.003_24 experimental. v4 perl hasn't been touched in five whole
years, and is not supported.
2) Get the CGI.pm module from CPAN. See
http://www.perl.com/perl/info/cool_modules.html for directions.
3) Check out the comp.infosystems.www.authoring.cgi newsgroup and
its various periodic postings.
4) Get a book or two on Perl and/or web programming. I recommend without
reserve any of the books rating four camels or better that are listed
on http://www.perl.com/perl/critiques/, and with reserve, most of the
three camel books as well. Do not bother with any below three.
--tom
--
Tom Christiansen Perl Consultant, Gamer, Hiker tchrist@mox.perl.com
Stranger does not rhyme with anger,
Neither does devour with clangour.
------------------------------
Date: 4 Feb 1997 12:04:15 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: Wanted: perl telnet examples
Message-Id: <5d78jv$8im@news-central.tiac.net>
In article <Pine.ULT.3.94.970203162709.29296J-100000@grus07.nor.chevron.com>,
Randall J. Wormser <nrjw@nor.chevron.com> wrote:
>Does anyone out there have an example which uses perl to run a telnet
>session? The Perl FAQ indicates that such an example resides at
>ftp.cis.ufl.edu:/pub/perl/scripts/getduatweather.pl, but I can't find it
>there or anywhere else. A direct reply would be most appreciated.
[emailed too]
ftp://ftp.cis.ufl.edu/pub/perl/CPAN/scripts/netstuff/chat2/index.html
has this in it:
Re: Getting perl to do a telnet
# File Name: chat2.examp
# File Size in BYTES: 3341
# Sender/Author/Poster: mkgray@athena.mit.edu (Matthew K Gray)
# Subject: Re: Getting perl to do a telnet
# Archived: Apr 6 1993
#
# The easiest way to do this is probably with the chat2.pl package.
# Here is a sample of using chat2.pl that retrieves info from the geographical
# name server:
#
And Eric Arnold has written Comm.pl which can be found in
ftp://ftp.cis.ufl.edu/pub/perl/CPAN/modules/by-authors/Eric_Arnold/ and
might be of some help.
Hope this helps,
Mike
--
mike@stok.co.uk | The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/ | PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/ | 65 F3 3F 1D 27 22 B7 41
stok@psa.pencom.com | Pencom Systems Administration (work)
------------------------------
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 V7 Issue 891
*************************************