Example 1

#!/path/to/perl

use Cwd;

$dir =
cwd;     # current preferred style

print "\nThe current working directory is \$dir $dir\n\n";

print 'If perl.exe was in this directory, the path would look like this:';

print "\n\n" . "$dir" . "\/" . "perl.exe\n";