Re: examples of sprintf
From: Barry Kimelman (raisin_at_delete-this-trash.mts.net)
Date: 10/02/03
- Next message: Iain Truskett: "Re: WWW::Mechanize .. anyone?"
- Previous message: Steffen Müller: "Re: Data::Compare bug - Fabien Tassin please contact me"
- In reply to: King: "examples of sprintf"
- Next in thread: Iain Truskett: "Re: examples of sprintf"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 2 Oct 2003 08:05:29 -0500
[This followup was posted to comp.lang.perl.misc]
In article <3F7AF041.20009@yahoo.com>, king21122@yahoo.com says...
> Hello
>
> are there some easy examples on how to use the sprintf, examples that
> will assume you don't know any thing about the function and takes you
> one step at the time teaching you the ins and outs on its usage?
> I have read the online docs, but need more easy examples.
>
> I am trying to add numbers 20 infront of the format %d%02d%02d and could
> not find an example on how to do it.
>
> thanks
$string = sprintf "20%d%02d%02d",$number1,$number2,$number3;
- Next message: Iain Truskett: "Re: WWW::Mechanize .. anyone?"
- Previous message: Steffen Müller: "Re: Data::Compare bug - Fabien Tassin please contact me"
- In reply to: King: "examples of sprintf"
- Next in thread: Iain Truskett: "Re: examples of sprintf"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|