[ale] perl and environment stuff

James P. Kinney III jkinney at localnetsolutions.com
Tue Dec 26 20:05:32 EST 2006


This is strange:

I have a perl script that does many things. One section is failing to
perform as intended when the user running it is logged into something
other than the console.

The failing section is _supposed_ to append about 10 lines of text to a
file that already exists. From a console user, it works as designed.
>From a user ssh'ed into the box, the appen does not work. It overwrites
the existing file. 


?!?!WTF?!?!?


The open command looks like:

open (FILEOUT, ">>$filetowrite") || die "Crud! $filetowrite puked $!\n";
print FILEOUT "$stuff\n";
close FILEOUT;

And $filetowrite is defined earlier and exists on the system (It's
the /etc/cups/printers.conf file for the morbidly curious)

The only thing I can think is that the remote users are getting a
different environment that drops the ">>" for a ">". But it's all bash
login shells. 

Suggestions on where to look?

I can write a workaround but now I'm just bugged about the why part :)
-- 
James P. Kinney III          
CEO & Director of Engineering 
Local Net Solutions,LLC        
770-493-8244                    
http://www.localnetsolutions.com

GPG ID: 829C6CA7 James P. Kinney III (M.S. Physics)
<jkinney at localnetsolutions.com>
Fingerprint = 3C9E 6366 54FC A3FE BA4D 0659 6190 ADC3 829C 6CA7
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part




More information about the Ale mailing list