print $sock "$cmd\n";
}
+# Submit a command to the MPD server and wait for it to complete.
+# Intended for simple cases where the command output is unneeded.
+sub run {
+ MPD::exec(@_);
+ while (<$sock>) {
+ last if (/^OK/);
+ die($_) if (/^ACK/);
+ }
+}
+
1;