+my ($quiet, $verbose, $binary, $ignore_errors, $download);
+
+sub print_version {
+ print <<EOF
+mpdexec.pl 0.9
+Copyright © 2021 Nick Bowler
+License GPLv3+: GNU General Public License version 3 or any later version.
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+EOF
+}
+
+sub print_usage {
+ my ($fh) = (@_, *STDERR);
+
+ print $fh "Usage: $0 [options] [command ...]\n";
+ print $fh "Try $0 --help for more information.\n" unless (@_ > 0);
+}
+
+sub print_help {
+ print_usage(*STDOUT);
+ print <<EOF
+This is "mpdexec": a tool to send simple commands to MPD.
+
+Options:
+ -h, --host=HOST Connect to the MPD server on HOST, overriding defaults.
+ -p, --port=PORT Connect to the MPD server on PORT, overriding defaults.
+ -q, --quiet Do not output any response messages. Only errors (on
+ standard error) or binary data (if enabled) are output.
+ -v, --verbose Print commands as they are submitted. If both --quiet
+ and --verbose are specified, --verbose has no effect.
+ -b, --binary[=FILE]
+ Output raw binary response data, which is normally not
+ written. If FILE is specified, the data is written there.
+ Otherwise, --quiet is automatically enabled and the data
+ goes to standard output.
+ --download Enable automatic sequencing of albumart and readpicture
+ commands; if this option is specified, such commands
+ without offsets will be expanded into multiple commands
+ in order to download the entire file.
+ --ignore-errors In batch mode, continue submitting commands after errors.
+ -V, --version Print a version message and then exit.
+ -H, --help Print this message and then exit.
+
+Report bugs to <nbowler\@draconx.ca>.
+EOF