in reply to Store and match
#!/usr/bin/perl use strict; while(<DATA>){ my ($x) = $_ =~ /^\[Note\](.*)/; print $x if ( defined( $x ) ); } __DATA__ [Note]note_values,notes_values2 [Book]novels,magazines [download]