Re: Finding the current user

2006-01-05 Thread Sherm Pendley
On Jan 5, 2006, at 6:04 PM, Sherm Pendley wrote: If you need more than the numeric user ID, have a look at: perldoc getpwnam perldoc User::pwent D'oh! getpwnam() is a function (not a module), so that should be: perldoc -f getpwnam perldoc User::pwent sherm--

Re: Finding the current user

2006-01-05 Thread Sherm Pendley
On Jan 5, 2006, at 5:53 PM, James Reynolds wrote: I know I can get this with `whoami`, but I was wondering if there was a "Perl" way to find the user who executed the script. I basically want to make it so my script is executable by normal users, but prints an error if it is not only the r

Re: @INC

2006-01-05 Thread Sherm Pendley
On Jan 5, 2006, at 3:41 PM, The Ghost wrote: The other perl was installed by darwinports. It doesn't ask questions. If it did, I wouldn't install it. I'm not concerned about incompatibilities You should be. as the perl versions are so close The versions are close, but the architectur

Re: @INC

2006-01-05 Thread Joel Rees
On 2006.1.6, at 05:41 AM, The Ghost wrote: The other perl was installed by darwinports. It doesn't ask questions. If it did, I wouldn't install it. I'm not concerned about incompatibilities as the perl versions are so close. I could reconfigure darwinports, but I don't want to. So this i

Finding the current user

2006-01-05 Thread James Reynolds
I know I can get this with `whoami`, but I was wondering if there was a "Perl" way to find the user who executed the script. I basically want to make it so my script is executable by normal users, but prints an error if it is not only the root user. -- Thanks, James Reynolds University of U

Re: @INC

2006-01-05 Thread The Ghost
The other perl was installed by darwinports. It doesn't ask questions. If it did, I wouldn't install it. I'm not concerned about incompatibilities as the perl versions are so close. I could reconfigure darwinports, but I don't want to. So this isn't a solution to my issue. Thanks tho

Re: @INC

2006-01-05 Thread John Delacour
At 12:15 pm -0600 5/1/06, The Ghost wrote: ...I have 2 versions of perl installed and only use one of them. The reason for 2 versions is a port system that refuses to rely on the already installed perl. So I have: /System/Library/Perl/5.8.6/darwin-thread-multi-2level AND /opt/local/lib/per

Re: @INC

2006-01-05 Thread Doug McNutt
At 12:15 -0600 1/5/06, The Ghost wrote: >How can I permanently add to @INC? I have 2 versions of perl installed and >only use one of them. The reason for 2 versions is a port system that >refuses to rely on the already installed perl. Try setting the PERL5LIB environment variable. It's forma

@INC

2006-01-05 Thread The Ghost
How can I permanently add to @INC? I have 2 versions of perl installed and only use one of them. The reason for 2 versions is a port system that refuses to rely on the already installed perl. So I have: $ /usr/bin/perl -e 'print join("\n", @INC)' /System/Library/Perl/5.8.6/darwin-thread-