title: How to format output in Perl?
body: <p>I have a Perl code responsible for formatting output. Problem is I need to calculate correct number of tabs to be put before one particular character in each string (let's say it's /). So instead of getting  lines with different lengths I'd like to get fixed-length strings (but as short as possible, using the longest as max). How should I approach this? </p>
  
  <p>Example of output (with format commented out, just raw array):</p>
  
  <blockquote>
  <pre><code>Long title with some looong words / short text
  Another title / another short text
  </code></pre>
  </blockquote>
  
  <p>I need it like this:</p>
  
  <pre><code>title with some looong words / short text
  Different title              / another short text
  </code></pre>
  
  <p>This was my first attempt, but it didn't involve using tabs after one particular character.</p>
  
  <pre><code>my $text = Text::Format-&gt;new;
  
  $text-&gt;rightAlign(1);
  $text-&gt;columns(65);
  $text-&gt;tabstop(4);
  
  $values[$i] = $text-&gt;format(@values[$i]);
  </code></pre>