#! /usr/bin/env perl use strict; use warnings; use File::Spec::Win32; use File::Spec; my $nuts = File::Spec->catfile('blah', ''); print $nuts . "\n"; # prints "blah/" (note the slash) my $two_nuts = File::Spec::Win32->catfile('blah', ''); print $two_nuts . "\n"; # prints "blah" (no slash)