Add an example code and a perl script