[32444] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 3711 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jun 10 14:09:18 2012

Date: Sun, 10 Jun 2012 11:09:04 -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           Sun, 10 Jun 2012     Volume: 11 Number: 3711

Today's topics:
        new topic: I call length($<string>) and get number of l <kquirici@yahoo.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Sun, 10 Jun 2012 09:30:05 -0700 (PDT)
From: kquirici <kquirici@yahoo.com>
Subject: new topic: I call length($<string>) and get number of lines - code frag below - on MAC OS X 10.7
Message-Id: <475b383a-e372-4e8e-bb67-fefd74aeda0b@googlegroups.com>

if( ! open JOURNALTXT, $inputfilename) {
 die "cannot open ".$inputfilename;
}

while (<JOURNALTXT>){
	$journalin = $journalin . %_;
}

close JOURNALTXT;

$journal_txt_len = length($journalin);	
print "journal length: " . $journal_txt_len;


-----------------
the last print statement returns 159 which is the number of  lines; there are
actually around 8k chars.

At first I thought it was because I was using TextWrangler which uses unicode utf8, so I googled that and added all the stuff necessary for unicode on perl 5.whatever, but I still just got number of lines.

any help much appreciated.

Regards,

Ken Quirici


------------------------------

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 3711
***************************************


home help back first fref pref prev next nref lref last post