just for fun, make the perl code work