#!/usr/bin/perl -w # This code not tested, as I sadly don't have a Mac at work use strict; use warnings; use Mac::AppleScript::Glue; use Data::Dumper; my $t = Mac::AppleScript::Glue::Application->new('iTunes'); my $track = $t->current_track; # Not sure if current_track is going to return a hash # or an object... print Dumper( $track );