Simplifying:
> # Renumber a series of tests from the command line
> perl -pi -e 's/(^\s+test\s+)\d+/ $1 . ++$count /e'
t/op/taint.t
This is what is called a "one-liner".
One enters the above at a shell prompt (command line).
The "perl -pi -e" combo is a common one for quick one liners.
You use it to read a file line by line, futz with each line
as you get it, then write it back to the file, overwriting it.
So:
perl -pi -e 's/foo/bar/' blah bleh
would, in each of the files blah and bleh,
replace the first foo on each line with bar.
Specifically:
-p read a line; do whatever code; print the line.
-i "inplace edit" input file(s), ie prints overwrite input file(s).
-e "execute" the perl code that follows.