Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] perl quicky


On Fri, 13 Oct 2000, Dean Hamstead wrote:

> how do i get the name of current directory (basically pwd) in perl?

chop($cwd = `pwd`);

or

perl -e 'use Cwd; print "You are in the " . cwd . " directory\n";'
You are in the /home/rodos directory

Easy.

Rodos