[33113] in Perl-Users-Digest
Perl-Users Digest, Issue: 4389 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Mar 14 14:09:20 2015
Date: Sat, 14 Mar 2015 11:09:02 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sat, 14 Mar 2015 Volume: 11 Number: 4389
Today's topics:
Re: Read from huge text file <gamo@telecable.es>
Re: Read from huge text file <rweikusat@mobileactivedefense.com>
Re: Setting hash values <hjp-usenet3@hjp.at>
Re: This RE isn't working as expected. <whynot@pozharski.name>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 13 Mar 2015 13:52:35 +0100
From: gamo <gamo@telecable.es>
Subject: Re: Read from huge text file
Message-Id: <mdumii$2al$1@speranza.aioe.org>
El 13/03/15 a las 09:35, Robert Crandal escribió:
> Suppose I have the following input text file which is
> divided into paragraphs. Each paragraph is separated
> by a border of 25 star characters.:
local $/ = "*" x 25;
and proceed as usual
while (<IN>){
# $_ now contains a paragraph
}
--
http://www.telecable.es/personales/gamo/
The generation of random numbers is too important to be left to chance
------------------------------
Date: Fri, 13 Mar 2015 19:22:28 +0000
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: Read from huge text file
Message-Id: <87y4n01z4b.fsf@doppelsaurus.mobileactivedefense.com>
gamo <gamo@telecable.es> writes:
> El 13/03/15 a las 09:35, Robert Crandal escribió:
>> Suppose I have the following input text file which is
>> divided into paragraphs. Each paragraph is separated
>> by a border of 25 star characters.:
>
> local $/ = "*" x 25;
>
> and proceed as usual
>
> while (<IN>){
> # $_ now contains a paragraph
> }
When doing this, $_ will end with the 25 stars and all paragraphs after
the first will begin with the \n of the separator line. Probably more in
line with what the OP wanted:
local $/ = ('*' x 25)."\n";
while (<IN>) {
chomp; # remove separator from $_
# now contains the paragraph
}
------------------------------
Date: Fri, 13 Mar 2015 23:22:55 +0100
From: "Peter J. Holzer" <hjp-usenet3@hjp.at>
Subject: Re: Setting hash values
Message-Id: <slrnmg6opv.3s7.hjp-usenet3@hrunkner.hjp.at>
On 2015-03-11 10:57, Rainer Weikusat <rweikusat@mobileactivedefense.com> wrote:
> 'Less experienced developers' (as opposed to 'inexperienced CS students
> with superiority complex based on that') never change code they didn't
> write ...
Muahaha!
hp
--
_ | Peter J. Holzer | Fluch der elektronischen Textverarbeitung:
|_|_) | | Man feilt solange an seinen Text um, bis
| | | hjp@hjp.at | die Satzbestandteile des Satzes nicht mehr
__/ | http://www.hjp.at/ | zusammenpaßt. -- Ralph Babel
------------------------------
Date: Fri, 13 Mar 2015 09:28:08 +0200
From: Eric Pozharski <whynot@pozharski.name>
Subject: Re: This RE isn't working as expected.
Message-Id: <slrnmg54c8.f95.whynot@orphan.zombinet>
with <_4-dnd9rzJzsgZzInZ2dnUVZ572dnZ2d@giganews.com> Robbie Hatley wrote:
*SKIP*
> Which is much better than the original 44 lines of gibberish, but how
> did lines get through which start with tab characters, "Re", "X-", and
> "Co"? Those should have been filtered out! Is there something
> fundamentally wrong with my regular expression?
I suggest to replace it with mime-tools.
--
Torvalds' goal for Linux is very simple: World Domination
Stallman's goal for GNU is even simpler: Freedom
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests.
#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 V11 Issue 4389
***************************************