while( ){ #no chomp, we need the \n later on... split /::/; if( $_[0] =~ /$search_name) { print join "
\n", @_; print "
\n"; } }