Help for this page

Select Code to Download


  1. or download this
        ### Open a handle on a string, read it line-by-line, then close it
    +:
        $SH = new IO::Scalar \$data;
    ...
            print "Got line: $_";
        }
        $SH->close;
    
  2. or download this
    use warnings;
    use strict;
    ...
    
    # or, if you prefer the one-liner look
    print for split ( m[(?<=$/)], $string );