in reply to Separating file names from path names

This scans for anything until you hit a period, finds word chars to the left and anything to the right. Quick and dirty.
$PATH = 'C:\Documents and Settings\darshan\Desktop\logo1.gif'; $PATH =~ /.*?(\w*?[\.].*)/s; print $1;