using extract perl script