[6653] in Perl-Users-Digest
Perl-Users Digest, Issue: 278 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Apr 11 11:17:23 1997
Date: Fri, 11 Apr 97 08:00:24 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 11 Apr 1997 Volume: 8 Number: 278
Today's topics:
Re: [Q] Unpack or split? (Clay Irving)
Re: a foreach quetion (Tad McClellan)
Re: current dir curiosity (Gerben Vos)
Re: HELP: Recursive directory mapping (Tad McClellan)
Re: Internally formatted variable <langlois@ccg.RNcan.gc.ca>
Re: Interprocess Communication (Matthew H. Gerlach)
Re: Kudos to Tom Christiansen and problems with OO <merlyn@stonehenge.com>
Re: MIME (base64) encoding script, help? (A. Deckers)
Re: No GUI environment for Perl? (Jamie O'Shaughnessy)
Re: No GUI environment for Perl? ()
Re: Ousterhout and Tcl lost the plot with latest paper (Robert Virding)
Re: Perl 5.004 release date? <merlyn@stonehenge.com>
Re: Perl NT problems (Phil Hanna)
Re: Perl NT problems (Nathan V. Patwardhan)
Re: perl parsing slashing question <flg@vhojd.skovde.se>
Perl regression test weirdness. (H. Todd Chapman)
Re: perl- equivalent to set -x (Gerben Vos)
Re: Perl5 sin function has dain bramage ?!?!?!?!? (Gerben Vos)
repeat pattern in one line <wschow@Comp.HKBU.Edu.HK>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 11 Apr 1997 08:04:15 -0400
From: clay@panix.com (Clay Irving)
Subject: Re: [Q] Unpack or split?
Message-Id: <5il9bv$ash@panix.com>
In <ebohlmanE8GC53.3Gu@netcom.com> ebohlman@netcom.com (Eric Bohlman) writes:
>Michael S. Kerry (Michael.S.Kerry@hrb.com) wrote:
>: I have fixed-length record data like the following:
>: 12345 78901 3456 8 abcdefghijkl
>: (a 5-digit number, a space, another 5-digit #, a space, a 4-digit #, a
>: space, a 1-digit #, a space, a 12-character (unquoted) string).
>: The numeric fields are pre-padded with zeros (if necessary) to maintain
>: the record positioning (i.e., the forth value is always in position 18).
>: What is the best (easiest? most reliable?) way to parse this record into
>: the 5 fields (4 numeric, one string)? Unpack or split? The string might
>: contain spaces (usually does, in fact...).
>unpack is pretty much your only choice, since split assumes the presence
>of separator characters or sequences. The presence of spaces shouldn't
>bother unpack.
Maybe it's too early in the morning and my brain isn't working at full
capacity yet, but... Why can't he split using space as a delimiter?
--
Clay Irving See the happy moron,
clay@panix.com He doesn't give a damn,
http://www.panix.com/~clay I wish I were a moron,
My God! Perhaps I am!
------------------------------
Date: Fri, 11 Apr 1997 06:19:10 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: a foreach quetion
Message-Id: <en6li5.ug.ln@localhost>
Allon Henig (ahenig@tx.technion.ac.il) wrote:
: Hi,
: I wonder if you have an answer to a very simple yet suprisengly
: itching problem:
: Many times I've been using the following statments:
: $array_index = 0;
: foreach (@array) {
: ... do something with $_ ;
: ... do something with $array_index ;
: $array_index++ ;
: }
: Is there a perl var that saves the use of the $array_index ???
: A premade perl var that gives the index of the $_ var ???
You could do it this way if you want to know the subscript:
for ($i=0; $i<@array; $i++) {
$_ = $array[$i];
... do something with $_ ; # except $_ is not an alias to the actual
# array element anymore...
... do something with $i ;
}
--
Tad McClellan SGML Consulting
Tag And Document Consulting Perl programming
tadmc@flash.net
------------------------------
Date: 11 Apr 1997 13:15:43 GMT
From: gerben@localhost.cs.vu.nl (Gerben Vos)
Subject: Re: current dir curiosity
Message-Id: <5ildhv$q4d@star.cs.vu.nl>
Ray Cromwell writes:
> It's just a curiousity of mine as to why Larry Wall never added
>it. I mean, you've got really low level O/S specific calls in there
>like shared-mem gets, but no builtin call for current directory which
>every O/S out there surely has?
Maybe people would start relying on it too much?
Unix, where Perl originated, has no reliable way of determining the
name of the current directory. The kernel doesn't keep track of its
name, only its inode (which is more or less a unique number for
something on the disk; there can be more than one name for a file or
even a directory, only the inode is unique). There is a getcwd() in the
C library, but it will fail if you don't have read or "execute"
permission on one of the current directory's parents.
. . . . . . . . . . . . . . . . . . . . . . . . . . . G e r b e n V o s <><
mailto:gerben@cs.vu.nl http://www.cs.vu.nl/%7Egerben/
Ceci n'est pas une .signature .
------------------------------
Date: Thu, 10 Apr 1997 23:02:54 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: HELP: Recursive directory mapping
Message-Id: <e5dki5.6mf.ln@localhost>
Ameer Badri (abadri@worldnet.att.net) wrote:
: Hi,
: I will appreciate if someone can help me with the following problem. I am
: looking for piece of Perl code to recursively map a given directory for a
: specific file type (ex. *.html).
: Thanks for your time and help,
^^^^^^^^^
You are expected to spend some of _your_ time first.
I thought that this part of the autoFAQ was pretty clear:
--------------------------------
7.5. Have you checked to see if a Perl module satisfies your needs?
Many reusable modules are available for immediate download and use.
See http://www.perl.com/CPAN/modules/00modlist.long.html for details.
8. Have you tried archives of Usenet? http://www.dejanews.com/
maintains an archive of postings to Usenet dating from March, 1995.
Be sure to include "Perl" in your search.
--------------------------------
Searching Dejanews in c.l.p.m for 'recursive directory' (taken
straight from your Subject:) finds 95 hits.
My guess is there are several different answers in there somewhere...
: Ameer
--
Tad McClellan SGML Consulting
Tag And Document Consulting Perl programming
tadmc@flash.net
------------------------------
Date: Fri, 11 Apr 1997 09:54:38 -0400
From: Dominic Langlois <langlois@ccg.RNcan.gc.ca>
Subject: Re: Internally formatted variable
Message-Id: <334E429E.59D8@ccg.RNcan.gc.ca>
Dominic Langlois wrote:
>
> Hi to everyone,
>
Dominic Langlois wrote:
>
>
> So, I would like to internally format a variable in such a way that it
> shows
> 0022 instead of just 22. I am looking a way to do this as in C with :
> sprintf (referId, "%04d", id); .
>
> I need this because I will use referId in many places in the program and
> I don't
> want to format every time.
>
> I have searched in the Llama and Camel books some references or examples
> but
> found nothing but the printf and format commands which seemed unuseful
> in this
> case.
>
> Thanks for any help.
>
Excuse-me all about asking such an easy question. I have found the
answer
to my question right here on this list just after sending the previous
mail.
The sprintf function could also be found in the Camel book on page 189
(1992).
Shame on me, I should have better check the index book.
Thanks and keep going.
------------------------------
Date: Fri, 11 Apr 1997 14:10:34 GMT
From: gerlach@netcom.com (Matthew H. Gerlach)
Subject: Re: Interprocess Communication
Message-Id: <gerlachE8H8pM.3Cq@netcom.com>
In article <5ij9eh$346@netnews.upenn.edu> omard@stipple.seas.upenn.edu (Digital Psychosis) writes:
>
>I want to open a telnet session, and link its INPUT and OUTPUT
>to something else also OPENed in perl.
>
>
I believe you have at least two ways to go. If you are running under
UNIX, look at Comm.pl. It has examples of "talking" to a telnet program.
Actually, it can talk to any program. If you are specifically interested
in telnet there it something like Net::Telnet you could try as well.
Matthew H. Gerlach
------------------------------
Date: 11 Apr 1997 07:12:30 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: billy@cast.msstate.edu (Billy Chambless)
Subject: Re: Kudos to Tom Christiansen and problems with OO
Message-Id: <8c912py7g1.fsf@gadget.cscaper.com>
>>>>> "Billy" == Billy Chambless <billy@cast.msstate.edu> writes:
Billy> [...] I would surmise that the OO Specialists were all busy
Billy> constructiong or whatever they do, and there was a big Wizard's
Billy> convention in Carmel that all the GW's were probably at.
Geez... I missed that one *again*! We really have to get the Wizard
Mailing List working better, folks.
And remember, next year it'll be in Boring, Oregon!
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,495.69 collected, $182,159.85 spent; just 508 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@ora.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: 11 Apr 1997 14:45:15 GMT
From: Alain.Deckers@man.ac.uk (A. Deckers)
Subject: Re: MIME (base64) encoding script, help?
Message-Id: <slrn5ksjjr.scr.Alain.Deckers@nessie.mcc.ac.uk>
In <3342D8A3.1D5A@BizServe.com>,
John Spaid <fmc@BizServe.com> wrote:
>Hi,
>
>I use a perl cgi program with html forms to mail attached MIME (base64)
>files to folks who request it. Right now I manually encode the files
>from binary to base64, but I'd like to script in the base64 encoding so
>I can encode binary files for attachments on the fly. Can anyone offer
>some help?
I know there is a module to do this sort of thing. If I remember
correctly, it is distributed as part of the MailTools package. Have a
look at CPAN.
<URL:http://www.perl.com/CPAN/modules/by-module/>
[followups redirected to clp.modules]
Cheers,
--
Alain.Deckers@man.ac.uk <URL:http://www.man.ac.uk/%7Embzalgd/>
Perl information: <URL:http://www.perl.com/perl/>
Perl FAQ: <URL:http://www.perl.com/perl/faq/>
Perl software: <URL:http://www.perl.com/CPAN/>
>>>>>>>>>>>>> NB: comp.lang.perl.misc is NOT a CGI group <<<<<<<<<<<<<<
------------------------------
Date: Fri, 11 Apr 1997 12:11:29 GMT
From: joshaugh@uk.oracle.com (Jamie O'Shaughnessy)
Subject: Re: No GUI environment for Perl?
Message-Id: <334e29cb.1549295046@newshost.us.oracle.com>
On 10 Apr 1997 12:36:57 GMT, scott@lighthouse.softbase.com () wrote:
>It's not the operating system. Windows 95 multitasks very well.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I'm no linux supporter (never used it) but Win95's multitasking is about as bad
as you could get. Compare it to WinNT - and I expect Linux, et al will be as
least as good as NT. Run a couple of medium weight processes on 95 and it
bumbles along at such a slow pace, it's barely an improvement over win3.1
>It's the user in this case not knowing how to take advantage
>of what's there.
>
>Scott
Sorry Scott but you've just lost all crefibility.
Jamie
___________________________________________________________________________
Jamie O'Shaughnessy Work: joshaugh@uk.oracle.com
Oracle Designer/2000 Forms Generator Team Home: jamie@thanatar.demon.co.uk
______________________________________________________ __ __ _ __ . __
Opinions expressed here are my own and not those of... (__)|-</-\(__ |__ -_
------------------------------
Date: 11 Apr 1997 13:04:06 GMT
From: scott@lighthouse.softbase.com ()
Subject: Re: No GUI environment for Perl?
Message-Id: <5ilcs6$7d$2@mainsrv.main.nc.us>
Jamie O'Shaughnessy (joshaugh@uk.oracle.com) wrote:
: I'm no linux supporter (never used it) but Win95's multitasking
: is about as bad as you could get.
That hasn't been my experience. I regularly run an incredible number of
applications at once. I generally have a DB2 database, Emacs, and run
the compiler from Emacs to do software development. I usually have the
MSDN viewer open and maybe other language documentation open. I have
one or more command prompt windows open. Usually I have Word open to
work on the manual for the product I'm developing, and I often have PFE
open to print out source files. I almost always have a web browser and
one or more telnet sessions open, and Organizer. And usually Paint Shop
Pro too if I'm working on my web site. This is all simultaneously.
: Sorry Scott but you've just lost all crefibility.
My crefibility is not the question. I simply am reporting what my
experience has been. Perhaps a well-tuned and well-maintained system
is a rarity -- maybe I should have an open house and invite people to
come watch me develop software or something.
Scott
------------------------------
Date: 11 Apr 1997 12:42:46 GMT
From: rv@erix.ericsson.se (Robert Virding)
Subject: Re: Ousterhout and Tcl lost the plot with latest paper
Message-Id: <5ilbk6$f85$2@news.du.etx.ericsson.se>
In article <r8tg1x1a7cb.fsf@salomon.CS.Princeton.EDU>, danwang@salomon.CS.Princeton.EDU (Daniel Wang) writes:
>
>After thinking about J. O's paper it looks like what he's really talking
>about is domain specific versus general purpose langauges.
>
>Where "scripting language" = Domain Specific
>and "systems language" = General Purpose.
>
>When he talks about "gluing" I think he's really ought to say putting
>together primitives designed by someone else that are at the right level of
>abstraction. Read with this perspective some of what he says sounds a bit
>more resonable.
The whole discussion about scripting or systems languages, from the
original definitions in Ousterhouts paper onwards, has been very
strange. This seems like the first attempt to give a more abstract
definition.
Previously it has been very bottom up: "we have features a,b,c,... ,
and will call a language with features g,i and m for a scripting
language, otherwise it is a systems language". Doing it this way is of
course completely ridiculous.
The only reasonable way to decide which languages are scripting
languages is to FIRST determine what you intend a scripting language
to be able to do and how it is meant to be used. THEN you can look
through your list of languages and those that satisfy your criteria
are then scripting languages, IRRESPECTIVE of which features they have
or lack. The features by themselves are really quite uninteresting, it
is the combination and general feel which is important.
Viewed in this way, calling everything which is not a scripting
language for a "systems language" is also ridiculous. I mean a
"systems language" must be one used for writing operating systems. If
scripting languages are used to glue things together what are the
things that I am gluing together to be written in? Application
languages?
However you look at it Ousterhouts paper to me stills read as some
form of technical advertising hype about why you should be using
Tcl. Limiting the languages placed in the same class as Tcl to VB also
clearly shows who the intended audience is. As is the way of making ad
hoc definitions which don't really relate to more normal CS usage.
A final question which has long interested me and which seems relevant
to this whole discussion: who would use Tcl if it DIDN'T have such a
integrated interface to Tk?
--
Robert Virding Tel: +46 (0)8 719 95 28
Computer Science Laboratory Email: rv@erix.ericsson.se
Ericsson Telecom AB
S-126 25 DLVSJV, SWEDEN
WWW: http://www.ericsson.se/cslab/~rv
"Folk sdger att jag inte bryr mig om negonting, men det skiter jag i".
------------------------------
Date: 11 Apr 1997 07:55:26 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: iglesias@draco.acs.uci.edu (Mike Iglesias)
Subject: Re: Perl 5.004 release date?
Message-Id: <8czpv5wqw1.fsf@gadget.cscaper.com>
>>>>> "Mike" == Mike Iglesias <iglesias@draco.acs.uci.edu> writes:
Mike> Does anyone have a guesstimate of when Perl 5.004 will be officially
Mike> released? I've had some requests to add GDBM and some other packages
Mike> to what we have now, and I'd rather not have to do this for 5 different
Mike> architectures and then find out that 5.004 is about to be released, have
Mike> our uses clamor for it, and have to do it over again.
Mike> I realize that schedules can slip and any estimated release date will
Mike> be treated as such.
OK. Here's a precise estimate.
"Soon."
:-)
Sorry, we're not really on a schedule... most of the P5P have day jobs
too, but the intent is to get 5.004 out real soon. It's in its fourth
or ninth public beta (depending on how you count sub-sub-versions),
and we're down to just fixing showstopper bugs.
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,495.69 collected, $182,159.85 spent; just 508 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@ora.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: Fri, 11 Apr 1997 13:06:52 GMT
From: (Phil Hanna)
Subject: Re: Perl NT problems
Message-Id: <334e3694.854002156@newshost.unx.sas.com>
On 10 Apr 1997 23:47:10 GMT, nvp@shore.net (Nathan V. Patwardhan)
wrote:
>Yuri Shtil (shtil@netcom.com) wrote:
>
>: perl -e 'print "foo\n"' fails with error message like:
Command line parameters with embedded spaces must be enclosed in
quotation marks, not apostrophes. 'print "foo\n"' is interpreted as
two parameters:
1. 'print
2. "foo\n"'
and the -e applies only to the first. Look at @ARGV with the perl
debugger.
What you want is
perl -e "print qq/foo\n/"
------------------------------------------
Phil Hanna (saspeh at unx dot sas dot com)
Econometrics and Time Series R&D
SAS Institute, Inc.
------------------------------
Date: 11 Apr 1997 14:29:12 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Perl NT problems
Message-Id: <5ilhro$7eg@fridge-nf0.shore.net>
Phil Hanna (any empty mail address, probably it's really God) wrote:
: >Yuri Shtil (shtil@netcom.com) wrote:
: >
: >: perl -e 'print "foo\n"' fails with error message like:
: Command line parameters with embedded spaces must be enclosed in
: quotation marks, not apostrophes. 'print "foo\n"' is interpreted as
: two parameters:
Interestingly enough, any of the examples given in the original posting
(and my follow-up) worked from the command-line on Solaris 2.5, SunOS 4.1.3,
FreeBSD-2.1.5, and Linux 1.2.13.
--
Nathan V. Patwardhan
nvp@shore.net
------------------------------
Date: 11 Apr 97 09:24:11 GMT
From: "Fredrik Lindberg" <flg@vhojd.skovde.se>
Subject: Re: perl parsing slashing question
Message-Id: <01bc465a$1bd24fa0$e20f10c2@odens.di.vhojd.skovde.se>
Jon Nathan <jn0729a@cage.cas.american.edu> wrote in article
<5ijtkt$k33$1@paladin.american.edu>...
> my code thus far is
>
>#!/usr/bin/perl
>
> while(<>){
> s/>-</> </g;
> }
>
> it seems to me that this should be enough - it runs and compiles (perl
> -w) with no complaints. i can run it fix.pl test.html and it seems to
> run but makes no changes to the file.
As you have noted, you are not changing the content of your file, and this
is not because of some bug in your code, its because you havent told Perl
to change the file.
The s// operator is changing the value of the $_ variable in the statement
above. You are not doing anything with this new value (like putting
it back in the file or something).
There are at least two ways to go from here:
You could change the #! line to this:
#!/usr/bin/perl -i.bak
and then run it.
or even replace the whole program with these two lines:
#!/usr/bin/perl -pi.bak
s/>-</> </g;
These two programs are using something called inplace editing, which
can be very handy sometimes. Check out the perlrun manpage for more info.
Be careful though. I usually run the program without the "-i.bak" option
until I have verified that the output is correct.
The other approach might be this, add a print after the s// line in your
code. Run the program like this
perl nbsp my_old_html.html > my_new_html.html
You then have to manually replace the actual files (presumably after you
have
controled the contents of my_new_html.html)
Hope this helps
/Fredrik
------------------------------
Date: 11 Apr 1997 10:16:21 -0400
From: htchapma@vela.acs.oakland.edu (H. Todd Chapman)
Subject: Perl regression test weirdness.
Message-Id: <5ilh3l$93g@saturn.acs.oakland.edu>
I am trying to compile Perl 5.003 on an SGI Indy running IRIX6.2.
When I run the regression tests anywhere between 1 and 3 tests fail. I can't make sense of it. One time op/overload will fail and the next time I run the test lib/bigintpm and lib/gdbm will fail. Somtimes others. If I run the test individually they always pass. These are the errors from make test that are seen every time:
Extracting pod2text (with variable substitutions)
AutoSplitting perl library
Making DynaLoader (static)
cc -32 -L/usr/local/lib -o perl perlmain.o libperl.a lib/auto/DynaLoader/DynaLoader.a `cat ext.libs` -lsun -lm -lc -lcrypt -lbsd -lPW
ld: WARNING 84: /usr/lib/libsun.a is not used for resolving any symbol.
ld: WARNING 85: definition of _setkey in /usr/lib/libc.so preempts that definition in /usr/lib/libcrypt.so.
ld: WARNING 85: definition of setkey in /usr/lib/libc.so preempts that definition in /usr/lib/libcrypt.so.
ld: WARNING 85: definition of _encrypt in /usr/lib/libc.so preempts that definition in /usr/lib/libcrypt.so.
ld: WARNING 85: definition of encrypt in /usr/lib/libc.so preempts that definition in /usr/lib/libcrypt.so.
ld: WARNING 85: definition of crypt in /usr/lib/libc.so preempts that definition in /usr/lib/libcrypt.so.
ld: WARNING 85: definition of _crypt in /usr/lib/libc.so preempts that definition in /usr/lib/libcrypt.so.
ld: WARNING 84: /usr/lib/libcrypt.so is not used for resolving any symbol.
ld: WARNING 84: /usr/lib/libbsd.a is not used for resolving any symbol.
ld: WARNING 84: /usr/lib/libPW.so is not used for resolving any symbol.
Can anyone make sense of this?
Thanks.
------------------------------
Date: 11 Apr 1997 14:21:35 GMT
From: gerben@localhost.cs.vu.nl (Gerben Vos)
Subject: Re: perl- equivalent to set -x
Message-Id: <5ilhdf$rfe@star.cs.vu.nl>
Howard Salomon writes:
>Operationally we run mostly in batch mode, in our shell scripts we use
>set -x to echo back to a file each command line, is there something in
>perl that does the same?
Not really; perl is quite different from the shell in that respect, since
it compiles your script to an internal representation and executes that.
The closest you can come is to use -Dtls (or maybe only t, l, or s), but
the output is not at all like your original script. See "man perlrun".
Make sure your perl is compiled with debugging support, or it won't work.
. . . . . . . . . . . . . . . . . . . . . . . . . . . G e r b e n V o s <><
mailto:gerben@cs.vu.nl http://www.cs.vu.nl/%7Egerben/
Data is not information, information is not knowledge, knowledge is not wisdom.
------------------------------
Date: 11 Apr 1997 13:50:05 GMT
From: gerben@localhost.cs.vu.nl (Gerben Vos)
Subject: Re: Perl5 sin function has dain bramage ?!?!?!?!?
Message-Id: <5ilfid$qqp@star.cs.vu.nl>
>Divide your degrees by $tpi to convert them to radians.
Rather, multiply them by $pi/180 (or divide by 180/$pi).
For nicer output, try `printf "%.4f", sin $pi/4', or variants thereof.
Experiment with %e, %f and %g and their parameters, and see which one you
like most.
. . . . . . . . . . . . . . . . . . . . . . . . . . . G e r b e n V o s <><
mailto:gerben@cs.vu.nl http://www.cs.vu.nl/%7Egerben/
Never attribute to malloc that which can be adequately explained by stupidity.
------------------------------
Date: 11 Apr 1997 13:41:35 GMT
From: Mr. Chow Wing Siu <wschow@Comp.HKBU.Edu.HK>
Subject: repeat pattern in one line
Message-Id: <5ilf2f$8m8$1@power42t.hkbu.edu.hk>
For example, if I want to match the pattern ABCDEF in the following file,
how to count the frequency? ANS:6 Please mail the source to me. Thanks.
--file begin--
ABCDEF ABCDEF ABCDEF
ABCDEF ABCDEF ABCDEF
--file end--
--
PGP PUBLIC KEY: https://www.comp.hkbu.edu.hk/~wschow/pgp.html
Key fingerprint = 15 C4 36 D6 EC CF 1D A4 7F D8 F9 EF 2E D7 32 A6
------------------------------
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 278
*************************************