<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1036663" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1036663</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/perl-printf-and-strings#comment-1210952</link>
    <description> &lt;p&gt;Cheers Abhishek&lt;/p&gt;
 </description>
     <pubDate>Sun, 26 Nov 2006 11:32:56 +0000</pubDate>
 <dc:creator>StuPeas</dc:creator>
 <guid isPermaLink="false">comment 1210952 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/perl-printf-and-strings#comment-1210950</link>
    <description> &lt;p&gt;The dash and dot flags are independent of each other, so forget about -15 for a moment.  [incode]printf(&quot;%.5s&quot;, $stringValue);[/incode] is what you&#039;re asking about.&lt;/p&gt;
&lt;p&gt;The dot flag is used to specify precision or maximum width of a value.  In this case, as the argument is a string, the .5s would truncate it to 5 characters if its length was in excess of 5:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;gt; printf (&amp;quot;%.5s&amp;quot;, &amp;quot;foo&amp;quot;);&lt;br /&gt;&amp;gt; foo&lt;br /&gt;&lt;br /&gt;&amp;gt; printf (&amp;quot;%.5s&amp;quot;, &amp;quot;foobarbaz&amp;quot;);&lt;br /&gt;&amp;gt; fooba&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;Precision or maximum width mean different things for other types of arguments, such as integers, floats, etc.  Refer to the &lt;a href=&quot;http://perldoc.perl.org/functions/sprintf.html&quot; class=&quot;bb-url&quot;&gt;sprintf&lt;/a&gt; perldoc for more.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Sun, 26 Nov 2006 04:50:02 +0000</pubDate>
 <dc:creator>Abhishek Reddy</dc:creator>
 <guid isPermaLink="false">comment 1210950 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
