See the Basic debugging checklist, the first item is to use warnings; use strict;. How to apply them to one-liners: hippo already mentioned -w, adding strict and diagnostics you get -wMstrict -Mdiagnostics:
$ perl -wMstrict -Mdiagnostics -e '"system(/usr/bin/perl /root/test.pl)"' Useless use of a constant ("system(/usr/bin/perl /root/test."...) in void context at -e line 1 (#1) (W void) You did something without a side effect in a context that does nothing with the return value, such as a statement that doesn't return a value from a block, or the left side of a scalar comma operator. Very often this points not to stupidity on your part, but a failure of Perl to parse your program the way you thought it would. ...
In reply to Re: executing perl script using -e
by Anonymous Monk
in thread executing perl script using -e
by mradul
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |