"be consistent" | |
PerlMonks |
readlink returning strange stuffby pileofrogs (Priest) |
on Aug 05, 2010 at 00:03 UTC ( [id://852992]=perlquestion: print w/replies, xml ) | Need Help?? |
pileofrogs has asked for the wisdom of the Perl Monks concerning the following question: Greetings, ye Monks of Perl. I'm writing something that does a lot of readlink calls, and sometimes it returns some pretty strange stuff. I'm guessing the strangeness is actually coming from my operating system, but I wanted to share and see what you all thought. Sometimes the returned string contains some non-printing characters followed by a bunch of pretty random looking stuff. Here's an example:
If I pipe that through less, I get to see markers showing me where the non-printing characters are:
An ordinary ls -l /proc/32433/exe says /proc/32433/exe -> /usr/bin/perl. I get the same by running the readlink command (/usr/bin/readlink). So it looks like the correct answer followed by a bunch of other stuff. If you're on linux, you can try this... ... and you might see what I'm talking about. Anybody know what's going on here? I'm on CentOS 5.5 running perl 5.8.8 from the perl-5.8.8-32.el5_5.1 rpm package. Thanks! --Pileofrogs
Back to
Seekers of Perl Wisdom
|
|