use strict; use Mac::AppleScript qw(RunAppleScript); sub tell_itunes { my $command = shift; my $script = qq(tell application "iTunes"\n$command\nend tell); print STDERR "\n", "-" x 50, "\n", $script, "\n", "-" x 50, "\n" if $ENV{ITUNES_TELL}; my $result = RunAppleScript( $script ); if( $@ ) { die <