Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Re: Re: Re: Converting CSV files to fixed width flat files

by PodMaster (Abbot)
on May 28, 2003 at 02:03 UTC ( [id://261175]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: Converting CSV files to fixed width flat files
in thread Converting CSV files to fixed width flat files

To the best of my knowledge, printf (and sprintf) will never truncate a field that is too long for the width specified in the format string
s?printf does what you tell it  printf "%1.1s$/", 'foy'; yields 'f',  printf "%s$/", 'foy'; yields 'foy'. As for Limbic~Regions note, you can't convert variable width "records" to fixed width ones without possibly undergoing some truncation ;)


MJD says you can't just make shit up and expect the computer to know what you mean, retardo!
I run a Win32 PPM repository for perl 5.6x+5.8x. I take requests.
** The Third rule of perl club is a statement of fact: pod is sexy.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://261175]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-03-29 08:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found