perl script for photos and video