in reply to Simple formatting question for credit card number
Check it out:
perldoc perlre is your friend....#!/usr/bin/perl -w ################################### use strict; use warnings; use diagnostics; my $cc="4744760012394122"; $cc =~ s/(\d{4})(\d{4})(\d{4})(\d{4})/$1 $2 $3 $4/; print $cc,"\n";
Peter @ Berghold . Net
Sieze the cow! Bite the day!
Nobody expects the Perl inquisition!
Test the code? We don't need to test no stinkin' code!
All code posted here is as is where is unless otherwise stated.
Brewer of Belgian style Ales
|
|---|