Converting digit to string with sprintf
#!usr/bin/perl use warnings; use strict; my $product = "product"; my $price = 39; my $line = sprintf "The %s costs \$%d\n.", $product, $price; print $line;