Next The Perl Hardware Store DC.pm Version 61

Interpolation.pm

        use Interpolation '$' => \&currency,
                          q   => \&quote_for_CSV,
                          Cap => sub { ucfirst lc  $_[0] },
                          HTML=> \&html_escape;
        $PROFITS = ($earnings - $expenses)/100;  
        $state = "maryland";
        $s = "$${$PROFITS} in the state of $Cap{$state}";
                $104,254.12 in the state of Maryland                
        $data = 'Cleveland, "Ohio"';
        $t .= qq{The data are: $q{$data}.};
                The data are: "Cleveland, \"Ohio\""
        $text = "x --> y";
        print qq{<a href="move.cgi?x,y">$HTML{$text}</a>};
                # .... x --&gt; y ....
        use Interpolation 's' => 'sprintf1';
        print "Profits were up by $s{'%2.2f',$amt} percent.\n";


Next Copyright © 2003 M. J. Dominus