Mega Code Archive

 
Categories / Perl / Language Basics
 

Printf Flag Modifiers

Conversion         Definition %-                 Left-justification modifier %#                 Integers in octal format are displayed with a leading 0;                     integers in hexadecimal form are displayed with a leading 0x %+                 integers are displayed with a numeric sign, + or - %0                 pad with zeros instead of whitespace %number            Maximum field width;  %.number           Precision of a floating point number;