in reply to Re^4: Formatting with sprintf
in thread Formatting with sprintf

$CCformatted = join '-', $cardNum =~ /..../g; still does not work. I have asked host to update Perl to 5.22.0.

Replies are listed 'Best First'.
Re^6: Formatting with sprintf
by LanX (Saint) on Nov 10, 2015 at 22:03 UTC
    > still does not work

    there must be another bug, I've just tested it with 5.6.2

    lanx$ perl -de0 Loading DB routines from perl5db.pl version 1.07 Editor support available. ... DB<2> $card = join '', 1..9,0..6 DB<3> p $CCformatted = join '-', $card =~ /..../g; 1234-5678-9012-3456 DB<4> p $] 5.006002

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!