Please note:
Originally, this question was posted to Stackoverflow with the title "How can I search for -f>@+?*<.-&'_:$#/%!
on Google?" or something similar. Someone hastily decided the question was not a programming question, and it has been kicked around, changed, merged, morphed several times since then. My answer has moved around with it. See also What is "-f>@+?*<.-&'_:$#/%!" in Perl?
To this day, the search for that fairly distinct string produces no results in Google despite the existence of this answer and the blog post giving it context.
Write it out:
-f
: perldoc -f -X. If no file name is specified (as is the case here) checks if $_
contains the name of a plain file
>
: Checks if the RHS is greater than the LHS
@+
: In scalar context, returns the number of elements in @+
?
: the conditional operator
*<
: The glob for main::<
.
: String concatenation operator
-&'_
: Invokes a subroutine main::_
. FYI, '
is the perl4
style package name separator. Try perl -MHTML'Template -e 1
.
:
: Continuing with conditional operator
$#
: The output format for printed numbers
/
: Division operator
%!
: %ERRNO
; see perldoc perlvar
So, it is not impossible to understand if you put a little effort into it. Clearly, this is not how anyone should write programs, but there some benefit from people pushing the boundaries.
$# is no longer supported
" on Perl 5.10