Skip to Content.
Sympa Menu

perfsonar-dev - Re: [pS-dev] perfsonar: r3702 - branches/rpm

Subject: perfsonar development work

List archive

Re: [pS-dev] perfsonar: r3702 - branches/rpm


Chronological Thread 
  • From: Ralf Kleineisel <>
  • To:
  • Subject: Re: [pS-dev] perfsonar: r3702 - branches/rpm
  • Date: Wed, 16 Apr 2008 15:28:27 +0200


wrote:

> - open( RPMMACROS, "> ~/.rpmmacros") or die "There was a problem opening
> the file ~/.rpmmacros for writing.";
> + my $homedir = `echo ~`; # workaround for Ubuntu (and maybe others)
> ~/.rpmmacros bug

This will only work if the shell that happens to run the echo expands "~".

The IMHO best way in perl would be:

my @pwuid = getpwuid($<);
my $homedir = $pwuid[7];

or $ENV{HOME} on Unixoid systems.




Archive powered by MHonArc 2.6.16.

Top of Page