#!/usr/bin/perl $txt="ab\ncd"; $txt =~ /a.*\nc/m; print "===match start===\n$&\n===match end===\n";