$ perl -we 'print $im->png' Name "main::im" used only once: possible typo at -e line 1. Can't call method "png" on an undefined value at -e line 1.