in reply to Short directory names...

I took a quick look at CPAN and wasn't able to locate a module that would simply do this for you.

A quick answer to your question might look something like this:

my $path = "C:\\Program Files\\Internet Explorer\\"; my @tokens = split(/\\/, $path); foreach(@tokens) { next unless length $_ > 8; s/\s//g; # remove whitespace $_ = substr($_, 0, 6) . '~1'; } $path = join("\\", @tokens);
Although the following problems immediately become apparent:

I think that in order to answer your question better, we need to know what you're doing with the Win9x LFNs. If you don't need to do it on the fly, you're probably best off looking up the 8.3 directory name and entering it by hand. If you're running Perl in a Win9x environment, you should be able to use quotes when opening files and pipes to take advantage of Win9x's CLI. For example:

open(OUTFILE, ">\"C:\\Temp\\Jane's Addiction.CHOPRO\"");

So tell us, what exactly are you trying to do? =)