I hope that wasn't your real credit card number.#!/usr/bin/perl -w use strict; my $number = '4744760012394122'; if ($number =~ /^(\d{4})(\d{4})(\d{4})(\d{4})$/) { $number = "$1 $2 $3 $4"; } else { print "Unable to convert $number\n"; }
Cheers - L~R
In reply to Re: Simple formatting question for credit card number
by Limbic~Region
in thread Simple formatting question for credit card number
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |