Perl - printf

perl

printf specifier format %flags width key
flags:    -        left justified
        +        insert + sign for positive integer
        space    insert space for positive integer
        #        add 0 for octal or 0x for hexadecimal
        0        padd number with leading zero

width:    m,n
keys:        c        character
        d        decimal
        e,E        scientific
        f        fixed representation of floating point
        g,G        if exponent is less than 4, use f, otherwise use E
        o        octal
        s        string
        x,X        hex
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License