The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

docs: sprintf for money.

code: |
    sub money_format
    {
        my ( $format, @amounts ) = validate_with(
            params => \@_,
            allow_extra => 1,
            spec => [
                {
                    type => SCALAR,
                },
                NUMBER,
            ]
        );

        my $rv = _strfmon( $format, @amounts );

        return $rv;
    }