#!/usr/bin/perl -w use strict; my $a = "1"; $a =~ s/^(\d)$/0$1/; print $a;