Perl code for workdigital