in reply to Data length in strings
Be that as it may, I think using <> in array context is going to build up a huge AV temporary (Perl's internal representation of an array). Also, I have a sneaking suspicion the person would also like to get rid of the newlines of each record, in which case one would do something like:
--my $foo; while( <> ) { chomp; # maybe, maybe not, depending on the circumstances if( defined( $foo )) { $foo .= " $_"; } else { $foo = $_; } }
|
|---|