Business-Shipping

 view release on metacpan or  search on metacpan

lib/Business/Shipping/Util.pm  view on Meta::CPAN

use File::Copy;
use Fcntl ':flock';
use English;
use version; our $VERSION = qv('400');
use vars qw(@EXPORT_OK);

@EXPORT_OK = qw( looks_like_number unique );

=head2 * currency( $opt, $amount )

Formats a number for display as currency in the current locale (currently, the
only locale supported is USD).

=cut

sub currency {
    my ($opt, $amount) = @_;

    return unless $amount;
    $amount = sprintf("%.2f", $amount);
    $amount = "\$$amount" unless $opt->{no_format};



( run in 0.641 second using v1.01-cache-2.11-cpan-ceb78f64989 )