For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > January 2006 > Reading text-files with more than 255 characters/line?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Reading text-files with more than 255 characters/line?
gstueb

2006-01-10, 4:02 am

Hello,

how can i read text files which hat more than 255 characters per line?
I have a .csv file with about 500 characters per line. The following
code example only read's 255 characters at once...

Thanks in advance,
Gregor
--------------------------------------------
#! /usr/bin/perl -w
#

$in = "customer.csv";
open IN, "<$in" or die "cannot open file: $!\n";
while ($in = <IN> )
{
chomp($in);
print "Len: " . length($in) . "\n";
}
close(IN);

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com