perl_notes
This is an old revision of the document!
code snippets
get base name and directory name from a file name
use File::Basename; # for fileparse use File::Spec; # for rel2abs # By default, the filename is not converted to absolute path. # It has to be done manually if necessary. # # Note that the directory name contains '/' at the end. my ($base_name, $dir) = fileparse(File::Spec->rel2abs( $fname));
perl_notes.1704319318.txt.gz · Last modified: 2024/01/03 22:01 by raju