Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- package Answer;
- sub verify {
- my @numbers = split('|', $_[0]);
- #if( $numbers[0] =~ /^-?\d+\z/ )
- if (substr($numbers[1], 2, 2) == substr($numbers[2], 8, 2))
- {
- return 0;
- }
- if (substr($numbers[1], 4, 2) == substr($numbers[2], 6, 2))
- {
- return 0;
- }
- if (substr($numbers[1], 6, 2) == substr($numbers[2], 4, 2))
- {
- return 0;
- }
- if (substr($numbers[1], 8, 2) == substr($numbers[2], 2, 2))
- {
- return 0;
- }
- return 1;
- }#1;
Add Comment
Please, Sign In to add comment