in reply to Simple formatting question for credit card number

My attempt.

my $cc_num; # Intitilized elsewhere print join ' ', unpack('A4 A4 A4 A4', $cc_num);

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

Note: All code is untested, unless otherwise stated