Help for this page

Select Code to Download


  1. or download this
        while ($$buffref =~ s/^(.*)\n//) {
          print "$1";
        }
    
  2. or download this
        while ($$buffref =~ s/([^\n]+)\n//) {
          print "$1\n";
          $$buffref =~ s/^\n//;
        }
    
  3. or download this
        while ( (my $pos = index($$buffref, "\n")) >= 0 ) {
          print substr($$buffref, 0, $pos + 1);
          substr($$buffref, 0, $pos + 1, '');
        }