title: basic perl code breakdown
body: <p>I just started on learning perl, and in the sample code given by my book there  is this line:</p>
  
  <pre><code>#!/usr/bin/perl
  @lines = `perldoc -u -f atan2`;
  foreach (@lines) {
  s/\w&lt;([^&gt;]+)&gt;/\U$1/g;
  print;
  }
  </code></pre>
  
  <p>the code works, that's not the problem. Also by observing the input and output I know that this line:</p>
  
  <pre><code>s/\w&lt;([^&gt;]+)&gt;/\U$1/g;
  </code></pre>
  
  <p>does this</p>
  
  <pre><code>ATAN2 ARCTANGENT TAN TANGENT &lt;--- X&lt;atan2&gt; X&lt;arctangent&gt; X&lt;tan&gt; X&lt;tangent&gt;
  </code></pre>
  
  <p>and this</p>
  
  <pre><code>MATH::TRIG::TAN &lt;------- C&lt;Math::Trig::tan&gt;
  </code></pre>
  
  <p>My question is: where does the X and the C come from?</p>
  
  <hr>
  
  <p>As an FYI: here is my output if I don't use the code:</p>
  
  <pre><code>perldoc -u -f atan2
  =over 8
  
  =item atan2 Y,X
  X&lt;atan2&gt; X&lt;arctangent&gt; X&lt;tan&gt; X&lt;tangent&gt;
  
  Returns the arctangent of Y/X in the range -PI to PI.
  
  For the tangent operation, you may use the C&lt;Math::Trig::tan&gt;
  function, or use the familiar relation:
  
      sub tan { sin($_[0]) / cos($_[0])  }
  
  The return value for C&lt;atan2(0,0)&gt; is implementation-defined; consult
  your atan2(3) manpage for more information.
  
  =back
  </code></pre>
  
  <p>And here is the complete output from the code:</p>
  
  <pre><code>[/cygdrive/c/Users/Documents/learn_perl]$ ./hello_world.pl 
  =over 8
  
  =item atan2 Y,X
  ATAN2 ARCTANGENT TAN TANGENT
  
  Returns the arctangent of Y/X in the range -PI to PI.
  
  For the tangent operation, you may use the MATH::TRIG::TAN
  function, or use the familiar relation:
  
      sub tan { sin($_[0]) / cos($_[0])  }
  
  The return value for ATAN2(0,0) is implementation-defined; consult
  your atan2(3) manpage for more information.
  
  =back
  </code></pre>