develooper Front page | perl.beginners | Postings from April 2008

Re: Substitute Variably hort string into long string at Right Justified possition

Thread Previous | Thread Next
From:
Jenda Krynicky
Date:
April 17, 2008 06:08
Subject:
Re: Substitute Variably hort string into long string at Right Justified possition
From: Paul Nickerson <pgn674@gmail.com>
> In short, I'm looking to do this: integer 4 -> string dbt0004sfg, and
> integer 287 -> string dbt0287sfg.

$filename = sprintf "dbt%04dsfg", $number;

Jenda
===== Jenda@Krynicky.cz === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
	-- Terry Pratchett in Sourcery


Thread Previous | Thread Next


Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About