$_ = "the end is nigh!\t\n \n"; m/(\s+)$(?{substr($_,-length$^N)=""})/; print "[$_]";