From: "Fred Sahakian" <[EMAIL PROTECTED]>

> I have data that prints to a flat file database.
> 
> The data can sometimes be 1, 2, 3, or 4 characters in length.
> 
> Id like to have it print a fixed length (6 characters) into the
> database, like this:
> 
> xyz|fred  |xyz  
> 
> instead of 
> 
> xyz|fred|xyz    
> 
> 
> Is there a simple solution?

$line = sprintf "% 4s|% 4s|% 4s", $foo, $bar, $baz;

Jenda
===== [EMAIL PROTECTED] === 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


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to