in reply to Parse text file data to send a mail.

Crossposted to StackOverflow. It's considered polite to inform about crossposting to avoid duplicate work of people not attending all the involved sites.
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]