swd - Perl pragma to change the current working directory
use swd;
The swd pragma changes the current working directory($ENV{PWD}) to the directory from which the called program is invoked; after callee returning the previous state of $ENV{PWD} is restored.
swd
use swd; # in the callee print "callee: $ENV{PWD}\n"; print $_,$/ for glob'*'; __END__ qx/callee/; # in the caller print "caller: $ENV{PWD}\n"; print $_,$/ for glob'*'; __END__
Cwd
Vidul Petrov, <vidul@cpan.org>
To install swd, copy and paste the appropriate command in to your terminal.
cpanm
cpanm swd
CPAN shell
perl -MCPAN -e shell install swd
For more information on module installation, please visit the detailed CPAN module installation guide.