print scalar split /\n/, $_, -1 for "1\n2\n3\n\n"; # Prints 5