in reply to Re^2: Newbie using modules
in thread Newbie using modules

... and ls doesn't show a expression.png file? (The desktop view might not be updated immediately, so use ls to check).

I tried your script (with a different path, of course), and it worked, and with a wrong output path (ie non-existing path) an error message is shown.

If you are sure that the file is not created, you might try to run your script with strace to find out if a system call failed:

strace -f perl myscript.pl

(Update: If you don't know how to read the output from strace, post the last 30 to 50 lines here (in <readmore><code>...</code></readmore> tags), maybe somebody can enlighten you).