Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Libraries

    Tie::Formatted 0.02

    Download button

    No screenshots available
    Downloads: 448  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Joe McMahon | More programs
    Perl Artistic License / FREE
    January 16th, 2007, 06:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Tie::Formatted description

    Tie::Formatted is a Perl module embed sprintf() formatting in regular print().

    Tie::Formatted is a Perl module embed sprintf() formatting in regular print().

    SYNOPSIS

    use Tie::Formatted;
    print "The value is $format{$number, "="} ",
    "(or $format{$number, "x"} in hex)n";

    print "some numbers: $format{ 12, 492, 1, 8753, "d"}n";

    This module creates a global read-only hash, %format, for formatting data items with standard sprintf format specifications. Since it's a hash, you can interpolate it into strings as well as use it standalone.

    The hash should be "accessed" with two or more "keys". The last key is interpreted as a sprintf format for each data item specified in the preceeding arguments. This allows you to format multiple items at once using the same format for each.

    Alternate name

    If you prefer, you can specify a different name for the magical formatting hash by supplying it as as argument when useing the module:

    use Tie::Formatted qw(z);

    This makes %z the magic hash instead.

    print "This is hex: $z{255, "x"}n";

    Tie::Formatted currently supports only one format in the final argument; this may change if there is demand for it.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    sprintf formatting | regular print | Perl module | Tie::Formatted | sprintf | formatting

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM