-e option takes an argument, a string that will be evaluated as Perl code. When you use
perl -lne '...' and
perl -nle '...' this works as intended as the ordering of the options is not important (in this case).
However, when you use
perl -nel '...', you say "evaluate the string
l as Perl code, and use
'...' as the name of a file to be read by that code", which makes little sense (this is why you get that strange looking "No such file or directory" error).
So, no, the order of the options is not important (here), but if you move the
-e option around, you have to move the option-argument, the Perl code, with it, so that the Perl code always comes directly after that option.
So, if you want to put the
-e option first, for example, use
perl -e '...' -ln
The order of the options to
perl is important if you mix options like
-n on the same command line. A
-p option will be overridden by a later
-n option and vice versa, so
perl -np is the same as
perl -p while
perl -pn is the same as
perl -n. This is documented in the
perlrun manual (see
man perlrun or