Daniel Kasak wrote:
> Hi all.

Hello,

> How do I, inside Perl, get the path of the home directory?
> I assume if I can do this, it will only work under Linux / Unix?

$ perl -le'print( ( getpwuid $< )[ -2 ] )'
/home/john
$ perl -le'print $ENV{ HOME }'
/home/john



John
-- 
Perl isn't a toolbox, but a small machine shop where you can special-order
certain sorts of tools at low cost and in short order.       -- Larry Wall

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to