$_ = "http://this.is.a.very.long.url.and.this.is/very/bad?after=I&dont=like&long&urls=and&they=look&really=ugly"; print "before: $_\n"; s/(.{30}).*(.{20})/$1 ... $2/; print "after: $_\n"; #### before: http://this.is.a.very.long.url.and.this.is/very/bad?after=I&dont=like&long&urls=and&they=look&really=ugly after: http://this.is.a.very.long.url ... hey=look&really=ugly #### -- package Lizard::King; sub can { do { 'anything'} };