James Edward Gray II wrote:
On Mar 24, 2004, at 7:59 AM, WC -Sx- Jones wrote:

while(<UPD1>) {
    chomp; s/^\s+//; s/\s+$//; next unless length;


There's probably not much reason to chomp() and s/\s+$//, since the later handles both.


Yes, and I forget that the way I used it chomp only gets ONE \n --

$_ = "Hello End of Lines\n\n\n";
chomp;  print "1: $_ this is after.\n\n";

$_ = "Hello End of Lines\n\n\n";
s/\s+$//;  print "2: $_ this is after.\n\n";


-- _Sx_ http://youve-reached-the.endoftheinternet.org/ _____ perldoc -qa.a | perl -lpe '($_)=m("(.*)")' | grep Martian

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to