Copies the current values of those variables into a "secret place",
and puts a value of undef into each of them.
Stomps over the undef with a string that is the concatenation
of all of the elements in the array.
Outputs the value of the variable.
Copies the values saved earlier in the secret place, back into $" and $patriot.
The same as all of these:
print @Patriot;
or
print join '', @Patriot;
or
print for @Patriot;
only harder to read and understand.
Where did you get that code?
It is of poor quality, which may say something about the rest of
the program that that snippet came from...
Without defining your subroutine,
What "subroutine"?
There is no subroutine there.
There is a BLOCK there.
You can have a BLOCK in many places besides the definition of a subroutine.
having it be the main
block...
See the "Basic BLOCKs and Switch Statements" section of:
perldoc perlsyn
is it kinda like (correct me if I'm wrong), the "main" function in
c++?
No.
The "main" in Perl is all of the code that is not in a subroutine definition.
There is also the "main" package, but that has to do with variables
rather than with execution of the program.
The poor code you've shown is what is usually called a "naked block",
which is often used to control the scope of a variable or its value.