if ( $WholePath =~ m!^(.*)/([^/]*)$! ) { # Have a match -- $1 and $2 are valid $LeadingPath = $1; $FileName = $2; } else { # No match, so there's no `/' in the filename $LeadingPath = "."; # so "file.txt" looks like ". / file.txt" ("." is the current directory) $FileName = $WholePath; } ----------------------------------------------------------------------------- Copyright 1997-2024 Jeffrey Friedl