title: Arithmetic with strings that contain numbers
body: <p>What is the Perlish way to deal with arithmetic with strings that contain numbers?</p>
  
  <p>Example: Say I'm dealing with font sizes that are represented with a string like -> "120px". I know the values of font sizes will always be formatted with number characters followed by non-number characters and I know that Perl will truncate any trailing characters of a string in arithmetic so could I do something like the following(with appropriate comments)? </p>
  
  <pre><code>#! /usr/bin/env perl
  
  use warnings;
  use strict;
  use utf8;
  
  use constant FONT_UNIT =&gt; 4; 
  
  my $font_size = "120px";
  
  STDOUT-&gt;print("${font_size}\n");
  
  $font_size = do {no warnings; $font_size + FONT_UNIT}."px";
  
  STDOUT-&gt;print("${font_size}\n");
  
  exit (0);
  </code></pre>
  
  <p>I ask because this feature of the language really works here.</p>