I know from this SO answer that naked dashes are used by various Unix utilities to specify that the user wants to use stdin or stdout instead of a regular file.
However, that doesn't quite help me understand the syntax of the following (which I took from a Heroku buildpack that basically installs a copy of Perl in a directory). Overall what's happening is that Perl is being downloaded from a URL at $PERL_PACKAGE and piped to tar, which extracts it to the directory $VENDORED_PERL
curl $PERL_PACKAGE -s -o - | tar xzf - -C $VENDORED_PERL
But the details are kind of confusing. -o is used when you want to specify a file for output instead of stdout, so I don't see why you'd use that option and then a dash, instead of just not using the option at all.
As for tar, I guess - is telling it not to use an input file since it's receiving the input from a pipe?
Maybe I'm missing some of the requirements of how pipes work.