https://github.com/monitoring-plugins/monitoring-plugin-perl/blob/3035ed03d86da7f36ba873e0027d7d3a30504256/lib/Monitoring/Plugin/Functions.pm#L122 Isn't the intention below? /\A\s*\n/mxs; or /^\S/;