Is this a script in a language other than perl
It's a Windows shell (cmd) command. If you need it in a batch file, you need to escape the %. Change %q to %%q.
I'm not familiar with cygwin
Cygwin is a OS emulator, not a shell or a scripting language. When people say Cygwin, they usually refer to bash and/or GNU tools. samtregar showed that a solution can be obtained using bash and GNU tools. I showed that such tools weren't required.
is there some significance to the use of "perl -pi.bak"
It invokes perl. -p and -i are documented in perlrun.