Given the YouTube url http://www.youtube.com/watch?v=sP4NMoJcFd4, the $video_id is sP4NMoJcFd4.
in reply to using WWW::YouTube::Download?
UPDATE... The following was sufficient to d/l that video (and it played successfully using VLC). I also used some of the other calls successfully, so it seems like all is working well with this module.
my $video_id = "sP4NMoJcFd4";
my $client = WWW::YouTube::Download->new;