I have this code to print the current directory using Perl:
use Cwd qw(abs_path); my $path = abs_path($0); print \"$path\\n\";
But it is di
Here is one simple solution:
use Cwd; my $cwd = cwd(); print "Current working directory: '$cwd()'";
I hope this will help.