Example 2
#!/path/to/perl
use Cwd;
use strict;
my $dir1 =
cwd();
# old style
print "\nThe current working directory is $dir1\n";
my $dir2 =
cwd;
# current preferred style
print "\nThe current working directory is $dir2\n";