#!/usr/bin/perl sub basename { my @filepath; @filepath = split(/\//,shift); return $filepath[@filepath-1]; } print &basename($0);