#!/usr/bin/perl

use Business::CreditCard;


    print "Testing card:\t 5276 4400 6542 1319\n";
    print validate("5276 4400 6542 1319"),"\n";

    print "Testing card:\t 5276 4400 6542 1319\n";
    print cardtype("5276 4400 6542 1319"),"\n";

    print "Testing card:\t 5276 4400 6542 131\n";
    print generate_last_digit("5276 4400 6542 131"),"\n";


    print "Enter your credit card number:\t";
    chomp ( my $card=<STDIN> );

    print "Valid Number\n" if ( validate( "$card" ) );
    print "Card Type:\t", cardtype( "$card" ),"\n"; 
    
