Re: Perl-Python-a-Day: split a file full path

2005-10-17 Thread Xah Lee
Xah Lee wrote: > > In Perl, spliting a full path into parts is done like this: Dr.Ruud wrote: > And then follows Perl-code that only works with an optional .html > "extension", Thanks for the note. I've corrected it here: http://xahlee.org/perl-python/split_fullpath.html namely: Note: the second

Re: Perl-Python-a-Day: split a file full path

2005-10-17 Thread matteo d'addio 81
Hello, I'm a cs student from Milano (Italy). I don't use scsh fequently but this should work: (open srfi-11 ;let-values srfi-28) ;format (define my-path "/Users/t/web/perl-python/I_Love_You.html") (let-values (((dir-name file-base-name file-extension) (parse-

Re: Perl-Python-a-Day: split a file full path

2005-10-17 Thread Dr.Ruud
Xah Lee: > In Perl, spliting a full path into parts is done like this: And then follows Perl-code that only works with an optional .html "extension", which is similar to the code in the File::Basename description. http://www.perl.com/doc/manual/html/lib/File/Basename.html It is best practice to

Perl-Python-a-Day: split a file full path

2005-10-16 Thread Xah Lee
Split File Fullpath Into Parts Xah Lee, 20051016 Often, we are given a file fullpath and we need to split it into the directory name and file name. The file name is often split into a core part and a extension part. For example: '/Users/t/web/perl-python/I_Love_You.html' becomes '/Users/t/web/p