#!/usr/bin/perl use strict; s/line\d+=(.*)// and print "$1\n" while (); __DATA__ line1=10 line2=30 line3= I am a monk line4=true