[7555] in Perl-Users-Digest
Perl-Users Digest, Issue: 1181 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 15 16:10:12 1997
Date: Wed, 15 Oct 97 13:00:23 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 15 Oct 1997 Volume: 8 Number: 1181
Today's topics:
caller(): any variables containing the call depth? gtuckerkellogg@genetics.com
COMMERCIAL: Type 1 Font Rasterizer Library (Munagala Ramanath)
do function prototypes work for object methods? <tw36027@glaxowellcome.com>
Grepping on a Parenthesis and an Asterisk in a Perl Scr (Kevin M Simonson)
Hash question. Hierachies with pairs <nashif@rz.uni-mannheim.de>
Re: Help Needed : Perl Signals (Matthew Cravit)
Re: Help on Security Issues (Faust Gertz)
Re: How do I can set lines per page with write function (Tad McClellan)
Re: How to delete a directory <seay@absyss.fr>
Re: How to go a particular line in a file? (Tad McClellan)
How to make a word bold? (John Robson)
Re: howto: implement a mailing list? <arkusa@rahul.net>
Re: Perl OLE and MSWord (Scott McMahan)
Perl Revision History - problem with Hash's <jerryp.usenet@SPAMconnected.demon.co.uk>
Re: Perl/Win95 interaction... (Jeremy D. Zawodny)
Re: PGP encoding with MIME::Entity? (Mike Heins)
Re: Quoting a variable in a regexp <usenet-tag@qz.little-neck.ny.us>
Re: Quoting a variable in a regexp (Tad McClellan)
regular expression extensions (Shrikant Vijay Ranade)
regular expression extensions (Shrikant Vijay Ranade)
Re: String manipulation in Perl (Jeremy D. Zawodny)
Re: String manipulation in Perl <usenet-tag@qz.little-neck.ny.us>
We're targets. (Mark A. Lehmann)
Re: We're targets. (Nigel Reed)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 15 Oct 1997 14:11:58 -0600
From: gtuckerkellogg@genetics.com
Subject: caller(): any variables containing the call depth?
Message-Id: <876941756.26733@dejanews.com>
My question is pretty much as the subject line states.
I use caller() regularly to debug modules, much as in the Camel book on
pages 311-315. Since an argument to caller is used to determine how many
stack frames to go, can I find the current stack depth in a simple way?
I'd like my "whowasi" function to print tabs or spaces to show the depth.
I know I can set the number of spaces within &whowasi by calling
caller($i++) until it fails, but considering all the nice special
variables that perl has, it surprises me that the depth of the call stack
isn't one of them.
BTW, I've recently taken to defining a function
sub absolve {
warn Carp::longmess @_ ;
}
This is like confess() but lives. :-)
Greg
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: 15 Oct 1997 18:28:09 GMT
From: ram@rainey.blueneptune.com (Munagala Ramanath)
Subject: COMMERCIAL: Type 1 Font Rasterizer Library
Message-Id: <6231vp$qs5$4@sjs-news-01.blueneptune.com>
CurveSoft(tm) is pleased to announce the availability of FontScope(tm):
A high-performance portable rasterizer library for Type 1 scalable fonts
sometimes also called PostScript(tm) fonts.
FontScope allows developers and programmers to build Type 1 scalable
font support directly into their applications thus providing a fast,
efficient, high quality platform-independent solution to the problem of
providing scalable font support.
We've tried to keep this announcement short, so please check our web
page at http://www.curvesoft.com for further details about the product.
BENEFITS OF FONTSCOPE
---------------------
1. Allows applications to transform Type 1 fonts via arbitrary 2x2
non-singular matrices (i.e. scale, shear and rotate).
2. Supports Multiple Master fonts including ones with intermediate
masters or ones that do non-linear interpolation such as Kepler or
Jenson.
3. TCL/TK users can display arbitrarily transformed text and/or
character outlines in TK canvas widgets via a new canvas item
called 'glyph'.
4. Distribution includes full sources.
5. No need to worry about whether the font server is installed
because font support is directly built into the application (many
UNIX sites do not run a font server).
6. Fast rasterization (see PERFORMANCE section on our web page). With
a font server, there is a substantial speed penalty due to IPC
(Inter-Process Communication) overhead.
7. Platform independence. The rasterizer does not depend on or need
X11 or Unix, so it is usable in a platform independent way.
Written in ANSI C and tested on SunOS and Linux under X11R6 and R5.
Should be buildable on most platforms with a little porting effort.
8. Thread safe.
9. Applications can retrieve character outlines (this is usually not
possible with a font server) as a sequence of straight and Bezier
segments.
10. Users of many other applications (such as xdvi, xfig, xpaint, tgif
etc.) that provide limited font support can integrate FontScope
into those applications to provide full scalable font support,
though some programming effort is obviously needed to perform the
integration.
11. Modest price.
12. Tested with hundreds of fonts from a variety of vendors.
FREE DEMO
---------
You can download a free demo for the Linux(x86) and SunOS(SPARC)
platforms from our web page at http://www.curvesoft.com . The demo lets
you arbitrarily scale, skew or rotate characters from any Type 1 font
you may have and view either the bitmap or the outline on the screen. If
you have Multiple Master fonts, it lets you create instances and then
view characters from those instances.
NO WARRANTY
-----------
Because of our limited resources and modest prices, FontScope is sold
AS IS with NO WARRANTY and NO SUPPORT (support contracts may be
purchased at additional cost). Once the product has been purchased and
the sealed pouch opened, we regret that we are unable to make refunds.
ORDERING
--------
To order FontScope please call 800-563-0843 toll-free from the U.S. or
Canada. Overseas callers can call 510-843-6485 but please note that it
will be a toll call. The order desk is staffed 8am-5pm (US Pacific time)
Monday-Friday.
The product is currently priced at US$39.95 plus shipping and handling
(S/H). S/H is $5.00 to anywhere in the U.S. or Canada (by U.S. Priority
Mail) $8.00 to most European destinations (by U.S. Global Priority Mail)
and higher to other destinations. California residents will also be
subject to sales tax.
Overnight shipment via Federal Express or UPS is also available at
additional cost. Current payment options are Visa or MasterCard. We
regret that we are unable to take personal checks or COD orders.
Please note that the sales staff manning the order desk at the above
numbers are not engineers and have little or no technical information
about the product, so please do not ask them technical questions. We
recommend reading the "Features and Benefits" and the "Frequently Asked
Questions" sections on our web page for technical information.
If you have access to a Linux(x86) or a SunOS(SPARC) machine, we
strongly suggest downloading the demo program since that allows you to
test FontScope on your own Type 1 fonts as well as get an idea of the
speed and quality. If unanswered questions still remain, please email
them to info@curvesoft.com .
NOTES
-----
-- CurveSoft and FontScope are trademarks of CurveSoft, Inc. PostScript
is a trademark of Adobe Systems.
-- Prices are subject to change without notice.
-- Please read the "Bugs and Patches" section on our web page for a list
of known limitations of FontScope.
------------------------------
Date: Wed, 15 Oct 1997 14:16:32 -0400
From: Thad Welch <tw36027@glaxowellcome.com>
Subject: do function prototypes work for object methods?
Message-Id: <34450880.12DC2192@glaxowellcome.com>
using perl 5.00401
Here's what I'm trying to do:
#!/pub/bioinfo/perl/bin/perl
require 5.0001;
use Objects;
use strict;
my $objs = Objects->new( [ 'Obj1', 'Obj2'] );
$objs->foreach { print "obj = $_\n" };
package Objects;
require 5.0001;
use strict;
sub new($$) {
my $self = shift;
my $objs = shift;
my $class = ref($self) || $self;
return bless {objs=>$objs}, $class;
}
#### notice the function prototype ####
sub foreach($&){
my $self = shift;
my $block = shift;
foreach (@{$self->{objs}}) {
&$block;
}
}
When I try this, perl gives me an error:
Can't use subscript on subroutine entry at x.pl line 11, near ""obj =
$_\n" }".
I thought the foreach prototype would allow me to pass a block without
the function
parens and sub {}?
This does work:
$objs->foreach ( sub { print "obj = $_\n" } );
doesn't look as nice.
Thanks,
Thad
------------------------------
Date: 15 Oct 1997 19:19:11 GMT
From: simonsen_nospam@skopen.dseg.ti.com (Kevin M Simonson)
Subject: Grepping on a Parenthesis and an Asterisk in a Perl Script
Message-Id: <6234vf$jbv@sf18.dseg.ti.com>
Keywords: grep parenthesis asterisk
I need to write a Perl script that takes the last line of a data file
that has a substring beginning with a right parenthesis asterisk pair, and
ending with the string " ns *)", and extracts from the contents of this
substring between these two boundaries. I guess I could have done an
"egrep" on the regular expression that I just defined, but instead of doing
that I tried doing a 'grep "(\*"' on the file in question, then piping its
output through a 'grep " ns \*)" on the output of that command, piping the
output from that process through a "tail -1", and finally getting rid of
the characters I don't need.
In the process of all this I learned that if I executed 'grep "(\*"'
inside a Perl script, I get different results than if I executed it on the
command line, as illustrated below. Anybody know why this is happening?
And perhaps more to the point, does anybody know how I can fix this so I
can do a "grep" that will get me just the line I want? Thanks in advance.
---Kevin Simonson
sh^Simonson/Tbs} cat GsData
abcdef
gh(*)l
mnopqr
stu*wx
yzabcd
sh^Simonson/Tbs} cat GrepStar
#!/usr/local/bin/perl
print '##### grep "\*" GsData #####' . "\n";
$Out = `grep "\*" GsData`;
print "$Out";
print '##### grep "(\*" GsData #####' . "\n";
$Out = `grep "(\*" GsData`;
print "$Out";
sh^Simonson/Tbs} GrepStar
##### grep "\*" GsData #####
gh(*)l
stu*wx
##### grep "(\*" GsData #####
abcdef
gh(*)l
mnopqr
stu*wx
yzabcd
sh^Simonson/Tbs} grep "\*" GsData
gh(*)l
stu*wx
sh^Simonson/Tbs} grep "(\*" GsData
gh(*)l
sh^Simonson/Tbs}
-------------------------------------------------------------------------
Reverence To send me mail, remove "_nospam" and
the eternal. all the vowels from my login name.
------------------------------
Date: Wed, 15 Oct 1997 20:17:00 +0200
From: Anas Nashif <nashif@rz.uni-mannheim.de>
Subject: Hash question. Hierachies with pairs
Message-Id: <3445089C.AE4F7FAF@rz.uni-mannheim.de>
Hello,
say you have a hash like this:
1,0
2,0
3,0
4,0
5,1
6,1
7,2
8,6
9,8
10,4
and you want to get this output:
1,0
5,1
6,1
8,6
9,8
2,0
7,2
3,0
4,0
10,4
the values indicates the next top pair in the hierarchy.
9,8
| |
| |____________this is the next top pair in the hierarchy
|_______________this is the pair number.
How can you do such a thing?
thanks,
Anas
------------------------------
Date: 15 Oct 1997 10:01:39 -0700
From: mcravit@best.com (Matthew Cravit)
Subject: Re: Help Needed : Perl Signals
Message-Id: <622stj$mp5$1@shell3.ba.best.com>
In article <3444E119.19EC@fmr.com>, Ed Tolsch <ds56947@fmr.com> wrote:
>I'm trying to duplicate some functionality in Perl which currently
>exists in Korn shell regarding signals. In Korn shell the fake signal
>ERR enables you to 'trap' a script or function exiting with a non-zero
>status.
In Perl, you are provided two "fake" signals - one which is generated when
a warning message is about to be printed, and one which is generated when
a fatal exception is about to be thrown.
You can trap them using someting like the following:
sub warning_handler { my $msg = $_[0]; # Do something }
sub die_handler { my $msg = $_[0]; # Do stuff; die($msg); }
$SIG{__WARN__} = \&warning_handler;
$SIG{__DIE__} = \&die_handler;
See page 139 of the blue Camel, or the %SIG section of the perlvar manpage
for more details.
Hope this helps.
/MC
--
Matthew Cravit, N9VWG | Experience is what allows you to
E-mail: mcravit@best.com (home) | recognize a mistake the second
mcravit@taos.com (work) | time you make it.
------------------------------
Date: Wed, 15 Oct 1997 18:45:30 GMT
From: faust@wwa.com (Faust Gertz)
Subject: Re: Help on Security Issues
Message-Id: <34450dc4.1054724@news.wwa.com>
John Timothy Kelly <johnk@discover-net.net> writes:
> I was wondering if anyone might be able to help me with adding security
> coding to a guestbook file I am writing for my web page.
On 15 Oct 1997 02:00:15 -0600, mfuhr@dimensional.com (Michael Fuhr)
wrote:
>For Perl security issues, read the perlsec manual page. For CGI issues,
>it would be better to ask in comp.infosystems.www.authoring.cgi, but
>here are a few pointers:
>
> http://www.genome.wi.mit.edu/WWW/faqs/www-security-faq.html
> http://www.go2net.com/people/paulp/cgi-security/
As a rule, running your script under '-Tw' and 'use strict;' is an
excellent idea. As you will learn from the above information, this is
not a cure all, but, for a novice, it is definitely a step in the
right direct.
Streben nach Wahrheit
Faust Gertz
Philosopher at Large
------------------------------
Date: Wed, 15 Oct 1997 14:16:10 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: How do I can set lines per page with write function.
Message-Id: <qp4326.ehh.ln@localhost>
Pierre BERGDOLT (Pierre.Bergdolt@ansf.alcatel.fr) wrote:
: the "write" instruction automatically generate ^L and print the top of
: page (that been defined with format ...._TOP=) every 66 lines by
^^
^^ 60?
: default. How can I change this number of lines??
>From the perlvar man page:
--------------------------------------
=item format_lines_per_page HANDLE EXPR
=item $FORMAT_LINES_PER_PAGE
=item $=
The current page length (printable lines) of the currently selected
output channel. Default is 60. (Mnemonic: = has horizontal lines.)
--------------------------------------
--
Tad McClellan SGML Consulting
tadmc@flash.net Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 15 Oct 1997 17:29:11 +0200
From: Doug Seay <seay@absyss.fr>
Subject: Re: How to delete a directory
Message-Id: <3444E147.359B74C9@absyss.fr>
fischers@execpc.com wrote:
>
> How would I delete an entire directory that has a file inside with one
> command?
You don't mention which platform you're using, so I'll assume unix.
Here is the easiest way
system("rm -rf $diretory");
Otherwise you will need to call unlink() on each file. This should be
done in conjunction with a recursive search of all subdirectories
(File::Find.pm should help you here). unlink() for files, rmdir() for
empty directories.
- doug
------------------------------
Date: Wed, 15 Oct 1997 14:12:09 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: How to go a particular line in a file?
Message-Id: <9i4326.ehh.ln@localhost>
John Robson (as646@FreeNet.Carleton.CA) wrote:
: The special variable $. automatically keeps track of the line read and
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
So, you have to read some lines for it to get changed.
: increments itself.
: But it doesn't allow you to modify it, to assign a value to it (?!).
That's right. perl assigns it, not the programmer.
You tell perl to read some lines, and perl, in turn, will update $. for you.
: Suppose I open a file and want to jump directly to, for example, line 8, how
: do I do this ?
You cannot do this.
That is not how most (Unix anyway) filesystems work.
I just explained all this here yesterday. Do a Dejanews search for:
Subject: Re: most efficient way to find the LAST line number in a file
... If you want to know why it can't be done (short version: filesystems
have no concept of "line", they just deal with a stream of bytes)
: Doing $. =+ 7 doesn't seem to work.
Because that does not cause any lines to be read in...
for ($i=0; $i<7; $i++) { # seven times
$_ = <>; # read a line
}
print "line $.: $_";
--
Tad McClellan SGML Consulting
tadmc@flash.net Perl programming
Fort Worth, Texas
------------------------------
Date: 15 Oct 1997 19:20:11 GMT
From: as646@FreeNet.Carleton.CA (John Robson)
Subject: How to make a word bold?
Message-Id: <62351b$a6t@freenet-news.carleton.ca>
How do you make a word or pattern *bold* by using the substitution.
Is it possible to do this in Perl?
------------------------------
Date: 15 Oct 1997 16:58:29 GMT
From: ARK Systems USA <arkusa@rahul.net>
Subject: Re: howto: implement a mailing list?
Message-Id: <622snl$cia$1@samba.rahul.net>
In article <344279E3.167E@MIT.EDU>, Andrey V Shytov <shytov@MIT.EDU> wrote:
>Lam_Sai_Tung wrote:
>> Is there other method to implement a mailing list? how?
I've been using procmail to implement a small mailing list (10-20
addresses). It's powerful enough to, for example, filter out
unauthorized postings and bounced messages. The header fields are
also processed properly (e.g. "Reply-To:" refers to the mailing list
address, not the original sender).
hiro
--
ARK Systems USA P.O. Box 23, Santa Clara, CA 95052-0023
http://www.arkusa.com Phone:+1(408)244-5358
mailto:arkusa@arkusa.com Fax:+1(408)244-5395
------------------------------
Date: 15 Oct 1997 18:32:56 GMT
From: scott@lighthouse.softbase.com (Scott McMahan)
Subject: Re: Perl OLE and MSWord
Message-Id: <62328o$5kj$3@mainsrv.main.nc.us>
My advice in general is to write a VBA macro to do what you want the
Office program to do, and run it from Perl. The Automation interfaces
in Office objects rarely conform to the Perl documentation I've seen.
Making them work is like a shot in the dark.
Scott
------------------------------
Date: Wed, 15 Oct 1997 18:09:55 +0100
From: Jerry Pank <jerryp.usenet@SPAMconnected.demon.co.uk>
Subject: Perl Revision History - problem with Hash's
Message-Id: <jjRo$AAjjPR0Ew2o@connected.demon.co.uk>
My (almost complete) shopping kart seems to be returning strange results
(too many and varied to list but it seems to be to do with processing
hash's.
1> Does Perl V5.001 handle hash's any differently to V5.003+ ?
2> Where can I find a Perl Revision History ?
(I am TRYING to get my ISP to upgrade....)
TIA
-- Jerry Pank
This post in every-way totally reflects the views of my employer...
I am he.
jerryp(dot)usenet(at)connected(dot)demon(dot)co(dot)uk
j_us__ tan________o_the_rperl__hack______________________________er
------------------------------
Date: Wed, 15 Oct 1997 16:58:01 GMT
From: zawodny@hou.moc.com (Jeremy D. Zawodny)
Subject: Re: Perl/Win95 interaction...
Message-Id: <3448f595.169989992@igate.hst.moc.com>
[cc'd automagically to original author]
On 15 Oct 1997 16:09:21 GMT, derosbr@cig.mot.com (Brian DeRosa) wrote:
>First, I have a question about "do-ability:"
>Is it possible to have a perl script interact with Win95 programs that would
>normally take user input manually? (for example, if I have a Win95 based
>program that asks for information fields to be filled in, is there a way of
>having a perl script provide the stdin?)
Hey, you're at cig.mot.com! Tell Tom Printy I said "Hi."
Anyway, you could pipe input to the program on STDIN if that's what
you're looking for. Something like:
open(PIPE, "|c:\\blah.exe") or die "$!";
print PIPE "input";
close(PIPE) or die "$!";
ought to work.
On the other hand it you have to put stuff into GUI boxes, you may
need to investigate OLE automation--if the application in question
supports it.
>I know this is possible on a Unix based system, but I have no experience doing
>it under Win95.
Works under NT, and I believe 95 almost as well... :-)
Jeremy
--
Jeremy Zawodny
Internet Technology Group
Information Technology Services
Marathon Oil Company, Findlay Ohio
http://www.marathon.com/
Unless explicitly stated, these are my opinions only--not those of my employer.
------------------------------
Date: 15 Oct 1997 19:01:28 GMT
From: mheins@prairienet.org (Mike Heins)
Subject: Re: PGP encoding with MIME::Entity?
Message-Id: <6233u8$7qg$1@vixen.cso.uiuc.edu>
Jochen Wiedmann (wiedmann@neckar-alb.de) wrote:
: Hello,
:
: I'd like to use the Mimetools package for automagically encoding
: mails with PGP. Integration into sendmail is no problem, I have
: it up and running. What I don't understand is, how to use the
: MIME::Entity object I have got after parsing the mail. For
: example, I could:
:
: - Take any part of a multipart message, encode the part's body
: and change the content-type to application/x-pgp-encoded or
: whatever. But that would obviously loose my original content
: type.
: - Take the complete entity, serialize it, encode it and create
: a new entity with the encoded object as a single part. But
: that would loose my mail headers and I'd like to keep them.
:
: In any case, I might become incompatible with existing mail readers.
: Can anyone recommend how to go on?
:
Dear Jochen,
Have you thought of recursive MIME encoding? Should be possible to
create a MIME entity with type of application/pgp-encrypted (that
is the official type, by the way) and then Base 64 encode that
and include it in your stream.
--
Regards,
Mike Heins
This post reflects the
opinion of my employer.
------------------------------
Date: 15 Oct 1997 18:37:26 GMT
From: Eli the Bearded <usenet-tag@qz.little-neck.ny.us>
Subject: Re: Quoting a variable in a regexp
Message-Id: <eli$9710151426@qz.little-neck.ny.us>
Posted and mailed.
Shay <shayv@geocities.com> wrote:
> here's the problem.
> i have a perl script as follows:
I'm betting you did not use '-w' on this script.
> $a=175;
> $pattern1="JOHNNY_" . $a . "_.._+";
> $pattern2="JOHNNY_$a_.._+";
$a_ is an undefined variable.
> print "Case 1: " . $_ . "\n" if (/JOHNNY_$a_.._+/);
$a_ is an undefined variable.
> my question is: how can i quote a variable in a regexp without using
> another variable (for interpolation ?!?), and why does case 3 succeeds
> and cases 1 and 4 fail.
print "Case 1: " . $_ . "\n" if (/JOHNNY_${a}_.._+/);
> well, i've looked it up in the faq and it says to add a \Q. tried it
> and it didn't work. (btw, what does \Q _actually_ say?)
\Q quotes non-alphanumerics with backslashes. It will prevent variable
interpolation here because it will escape the $.
Elijah
------
that underscore thing seems to trip a lot of people
------------------------------
Date: Wed, 15 Oct 1997 14:29:44 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Quoting a variable in a regexp
Message-Id: <8j5326.9lh.ln@localhost>
Shay (shayv@geocities.com) wrote:
: here's the problem.
: i have a perl script as follows:
: ---------------------------
: open(F, infile) or die "Can't open infile";
^^^^^^
^^^^^^ bareword
Barewords are bad.
Put quotes around strings.
: $a=175;
: $pattern1="JOHNNY_" . $a . "_.._+";
: $pattern2="JOHNNY_$a_.._+";
^^^
$a_ is an undefined variable.
The -w switch will warn about this.
You wouldn't be so silly as to post a question to Usenet without
seeing if -w could debug your program for you first, would you? ;-)
Always use the -w switch...
$pattern2="JOHNNY_${a}_.._+"; # fixes case 1 and 4
^ ^
^ ^
: well, i've looked it up in the faq and it says to add a \Q. tried it
: and it didn't work. (btw, what does \Q _actually_ say?)
The perlre man page describes perl's regular expressions. It says:
"\Q quote regexp metacharacters till \E"
So I would guess that it quotes regexp metacharacters ;-)
m/\.html$/;
is equivalent to:
m/\Q.html\E$/;
That isn't your problem though...
--
Tad McClellan SGML Consulting
tadmc@flash.net Perl programming
Fort Worth, Texas
------------------------------
Date: 15 Oct 1997 18:22:51 GMT
From: svr5@farman.cac.psu.edu (Shrikant Vijay Ranade)
Subject: regular expression extensions
Message-Id: <6231lr$13m4@r02n01.cac.psu.edu>
--
____________________________________________________________________
| | |
| * * * * * * * * | |
| * * | |
| * Penn State * | |
| * * | Shrikant V. Ranade |
| * 1 8 5 5 * | Center for Academic Computing |
| * * | The Pennsylvania State University |
| * * | Phone no. (814)-863-1770 |
| * * | |
| * * | |
| * * | |
| * | |
|____________________________________________________________________|
------------------------------
Date: 15 Oct 1997 18:27:07 GMT
From: svr5@farman.cac.psu.edu (Shrikant Vijay Ranade)
Subject: regular expression extensions
Message-Id: <6231tr$13m4@r02n01.cac.psu.edu>
--
____________________________________________________________________
| | |
| * * * * * * * * | |
| * * | |
| * Penn State * | |
| * * | Shrikant V. Ranade |
| * 1 8 5 5 * | Center for Academic Computing |
| * * | The Pennsylvania State University |
| * * | Phone no. (814)-863-1770 |
| * * | |
| * * | |
| * * | |
| * | |
|____________________________________________________________________|
------------------------------
Date: Wed, 15 Oct 1997 18:25:14 GMT
From: zawodny@hou.moc.com (Jeremy D. Zawodny)
Subject: Re: String manipulation in Perl
Message-Id: <34450a65.175317473@igate.hst.moc.com>
[cc'd automagically to original author]
On Wed, 15 Oct 1997 16:54:54 GMT, zawodny@hou.moc.com (Jeremy D.
Zawodny) wrote:
>You posted this to comp.lang.perl.misc, which is a dead newsgroup (and
>has been for a couple years). Please notify your news server
>administrator so that s/he can remove it.
I apologize for the Brain Fart[tm] on my part. I meant to say that
comp.lang.perl is dead, *not* this group....
But you all knew that, right? :-)
Jeremy
--
Jeremy Zawodny
Internet Technology Group
Information Technology Services
Marathon Oil Company, Findlay Ohio
http://www.marathon.com/
Unless explicitly stated, these are my opinions only--not those of my employer.
------------------------------
Date: 15 Oct 1997 19:05:10 GMT
From: Eli the Bearded <usenet-tag@qz.little-neck.ny.us>
Subject: Re: String manipulation in Perl
Message-Id: <eli$9710151434@qz.little-neck.ny.us>
Jeremy D. Zawodny <zawodny@hou.moc.com> wrote:
> [cc'd automagically to original author]
CCed to attributed contributors.
> On 15 Oct 1997 10:56:49 -0500, John Goerzen
> <jgoerzen+usenet@complete.org> wrote:
>
> You posted this to comp.lang.perl.misc, which is a dead newsgroup (and
> has been for a couple years). Please notify your news server
> administrator so that s/he can remove it.
s/[.]misc//
comp.lang.perl has been superseded by comp.lang.perl.misc. The former
is defunct the latter is not. Jeremy knows this, but the typing mistake
is very confusing.
> The free interchange of ASCII values and their character counterparts,
> however, isn't a given in Perl. Since Perl often decides whether to
> interpret a chunk of data as a string or number (float, int, etc.)
> based on the context in which they're used, it's a bit of mindset
> shift.
Yup, keeping this in the context of strings, it is fun that perl can
handle things like:
$a .= @ARGV; # append "argc" to $a
$b = "frotz the newbie"; # assignment
$b ^= "-enlightenment-\n"; # bit wise or
> Some more food for thought. Think about what you're trying to
> accomplish in a larger sense. Might there be a more "Perl Way" of
> doing it? Perhaps you could post some code or an idea of what
> functionality you're trying to implement.
Often times the "need" to access individual bytes is a result of
a C mindset. There usually is a better way for perl. ("Better"
limited to the context of perl.)
s/./(code)/se is a very perlish way to iterate over characters in
an array for instance. It is not at all intuitive to the C mind
though. On the other hand, s/(.{70})./$1 /s is not a good way to
set the 71st character to a space, though it will work.
Examine some more perl programs to get a feel for perl solutions.
Elijah
------
just ruined his original content ratio rating for the week :^)
------------------------------
Date: 15 Oct 1997 13:03:45 -0500
From: mlehmann@prismnet.com (Mark A. Lehmann)
Subject: We're targets.
Message-Id: <5b7mbeoqda.fsf@smokey.prismnet.com>
I typically only post to this news group. The email blasters tend to pick up
my email from this newsgroup. Then I get all types of email enticing me to
spend money and use my computer to do things that are either immoral, illegal,
or annoying.
What are techniques that you are using to be able to effectively contribute
to this news group and not be targeted for them e-trash? Is there another
group that discusses anti-e-trash infiltration?
Can we do something as a group to tell the companies searching for email
address targets to stay out of our perl newsgroups?
--
Mark Lehmann.
------------------------------
Date: 15 Oct 1997 16:58:31 GMT
From: nigelr@convex.hp.com (Nigel Reed)
Subject: Re: We're targets.
Message-Id: <622snn$o0r$1@news.rsn.hp.com>
Find out who is spamming you and send them a bill for $500
for each unsolicited email you receive.
Enforce it in the court if you need to.
Regards
Nigel
Mark A. Lehmann (mlehmann@prismnet.com) wrote:
> I typically only post to this news group. The email blasters tend to pick up
> my email from this newsgroup. Then I get all types of email enticing me to
> spend money and use my computer to do things that are either immoral, illegal,
> or annoying.
> What are techniques that you are using to be able to effectively contribute
> to this news group and not be targeted for them e-trash? Is there another
> group that discusses anti-e-trash infiltration?
> Can we do something as a group to tell the companies searching for email
> address targets to stay out of our perl newsgroups?
> --
> Mark Lehmann.
------------------------------
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 1181
**************************************