Forum Moderators: coopster & phranque
$script_name =~s@^.*/@@;
will remove everything up to and including the last /, effectively leaving just the script name.