TO extract cords from building [Perl]