Hi, When I tried using sprintf to replace my search string, I am encountering a problem. My program line to replace is below
$_ =~ s/<xref t="n(\d+)"\/>/'<xref target="note-'.sprintf{"%02d",$1}.'"\/>'/egs;
But instead of getting the replaced string as a zero-filled two digit number, it displays HASH{x....}. Could anyone help me how to replace the searched string with zero filled number? Thanks
In reply to Using sprintf by rsriram
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |