New perl code