First of all thanks for your help. I made this script out of the need to extract the youtube video name from a youtube address. I hope it helps.
Warmest regards,
Tony Mty
#!/usr/bin/
perl
# s.u.f.y.a.
# Strip the Url From a Youtube Address
# Purpose: This small
perl snippet will extract the name of the video out
# from a youtube address.
# Based on:
#
http://www.unix.com/newreply.php?do=...=1&p=302231091
# hth
# tony mty
#
print "\Script to strip the url from a youtube address";
print "\nYoutube URL: ";
$youtubesurl = <STDIN>;
$youtubesurl=~ s/^\s+//; #strips off space
$youtubesurl=~s/.*watch\?v=//; #returns everthing after "watch?="
$youtubesurl=~s/&.*//; #returns everthing before "$"
print "$youtubesurl\n";
print "Done.\n";