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



--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug

Reply via email to