my perl code for spider