0

Could someone explain what the PS period is used for? I have found it being used in a few different ways. I didn't know if it was just situational or if I'm just understanding it wrong.

$a = $a.Replace(" Scripting Guys", "")

Here is just an example of what I mean. Thank you for the help! Could someone explain the proper term for the period as well? I'm not sure what you're supposed to call it. In PHP and Perl we call it the concatenator character. For concatenation of-course. I'm trying to get an idea of why that period is used that way and the other ways it's used.

Thank you for any information!

cloudnyn3
  • 769
  • 4
  • 10
  • 15
  • It means a couple of different things in context but when used with variables it is used to calls methods, properties etc. of the object. `$a | Get-Member` to see a list. In your specific case you are calling the string method `replace` – Matt Jan 13 '16 at 02:39
  • Make that an answer. I'll upvote it. – cloudnyn3 Jan 13 '16 at 02:45
  • Holy crap... I went looking for a dup and it was from you! crazy The duplicate contains the link I would have use in the documentation as well that states exactly what I said in the comment. – Matt Jan 13 '16 at 02:52
  • Sorry, I was asking a bit of a different question. That is pretty much a duplicate. I will close it. – cloudnyn3 Jan 13 '16 at 03:07
  • The question is slightly different but the answer is the same. don't delete... mark it as the dup as that is a perfect case for it. – Matt Jan 13 '16 at 03:11
  • Take a look at the `about_operators` help topic (`man about_operators`) and check out the `dot source operator`, `property dereference operator` and `range operator`. – Keith Hill Jan 13 '16 at 07:09

0 Answers0