On 08/14/2013 11:26 AM, *Shaji Kalidasan* wrote: > my ($name, $phone, $address) = /^([a-zA-Z ]+):([\-\d]+):([\w, ])$/;
And here is your second problem ... the "name" part matches. The phone-number part matches if you either fix the numbers in the source data, or allow — in the regexp THe address part will only match if the remainder of the string after the second colon is exactly ONE character in the set [\w, ] Adding a single plus to make /^([a-zA-Z ]+):([\-\d]+):([\w, ]+)$/ will work if you fix the input data. Adding a — to your regexp will work with the existing data adding use utf8; binmode STDOUT,":utf8"; will stop sqawks about wide-character printing -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/