Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

RE: RE: RE: Answer: How do I get all the permission flags on a file?

by merlyn (Sage)
on Sep 26, 2000 at 18:21 UTC ( [id://34012]=note: print w/replies, xml ) Need Help??


in reply to RE: RE: Answer: How do I get all the permission flags on a file?
in thread How do I get all the permission flags on a file?

The funny thing is, I probably take criticism better than anyone I've ever met
If you trigger on the words "difficult" and "incorrect", taking them personally in a way no other person I met has, I highly doubt your claim.

It's not my intention to discredit you. In fact, I didn't care who wrote that post. What I saw was what I said... a series of difficult-to-get-right steps to accomplish what could be accomplished in a short sequence.

And as for answering this to the original poster, as I view back up the thread, it's not even the right answer. The answer I gave earlier was much closer to what the original poster wanted. Your posting strayed further away, giving a mostly useless octal value where what was needed was simply taking the stat value, optionally anding it with 07777, and then handing that to chmod. That's what I said, and even though I didn't include code, it was more accurate and accomplished more than your detour, either original, or as I corrected it.

So, I challenge your claim that you can take constructive criticism. I also challenge your claim that your answer was more useful than mine.

Heck, you'll probably even see this post as another personal assault, when really I'm just trying to get you to see that you're being ineffective and distracting, although you get an A for effort. {grin}

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
RE: RE: RE: RE: Answer: How do I get all the permission flags on a file?
by BastardOperator (Monk) on Sep 26, 2000 at 19:17 UTC
    UPDATE: Please don't upvote this, it's not worthy of that, downvoting is fine (for obvious reasons), but not upvoting

    First off Randall, have you tried my method? I can't find where it comes up as incorrect, I use yours on /usr/bin/login, it returns 4511, I use mine on /usr/bin/login, it returns 4511, am I missing something? If so, please tell me. Also, I _never_ said mine was more useful than yours, I simply said that it has been working for me. If my answer will not accomplish what this individual set out to do, please tell me how (after trying my answer). Yes, it wasn't as pretty as yours, and yes, I've even substitued yours for mine in some programs, but as the Perl mantra states TMTOWTDI. Randall, what you have to understand is that people view the world differently, I don't know what you're thinking when you write a reply, whether you have bad or good intentions. All I know is how I view your response, and to me I see it as a subtle attack. I stand by my claim that I can take constructive criticism better than most, but as I said, I don't view this as constructive. I've done and seen too much in my life to not call a spade a spade. I only have to watch you for a week and I know you, I've met too many people like you not to recognize it. I've seen you respond to others similarly. They may not have responded, they may be use to it. I'm not, nor will I ever be. You can tell people that you have good intentions, but I don't see it. I see a person who is very concerned about others stealing their thunder. I see a person who says what they feel subtly and ends it with a {grin} so as to disguise the true feeling behind it. At least I can lay mine on the table, --'s or not, no matter to me.
      sub return_mode { my $mode = shift; my @modelist = (($mode & 7000)>>9, ($mode & 0700)>>6, ($mode & 007 +0)>>3, ($mode &0007)); return join('', @modelist); } print return_mode (07777), "\n";
      prints 5777 on my machine. Nuff said. Your code has 7000 where it needs 07000.

      -- Randal L. Schwartz, Perl hacker

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://34012]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-03-28 17:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found