in reply to process file via command line

You'll probably be interested in the command line switches -p, -n, and -l... These give various levels of convenience when dealing with a file from the command line (see perlrun). You'll then want to use -e, as you've done, but follow the quoted code with the filename you're working on, so that it's fed to your script as a parameter.

perl -ne 'print unless /^#/' myfile.log
-Bird