in reply to Inserting data in Mysql

Your regex,
  if (my ($id) = /\bid=(\d+)/),
won't match some of your data; to wit:
idno=22 name="Jack Henry" age=28 address="10, Sudon village, Brownie, 3251"

Small sidebar re your formatting: please use <c>...</c> tags around your data -- including, for example, not only the data you show us, but also the tables, id name age address