The Audio-Scrobbler module provides a Perl and command-line interface to Last.fm's AudioScrobbler - http://www.audioscrobbler.com/.