Hi,

I have an input file as below:- Name: saya Mobile: 013 Name: ken Mobile: 019

Right now i can read the input data and split it with new line (\n). But How could i append a new data at the begining and last of the record, as example:- Title: Executive Name: saya Mobile: 013 done

Could somebody help me and give some example ? #### sub get_title { my ($name) = @_; return "..."; } { local $/ = ''; while () { s/\n+\z/\n/; my ($name) = /Name:\s*(.*)/; my $title = get_title($name); print("Title: $title\n"); print("$_"); print("done\n"); print("\n"); } } __DATA__ Name: saya Mobile: 013 Name: ken Mobile: 019