There's more than one way to do things | |
PerlMonks |
Re: Check a string for consecutive digitsby Anonymous Monk |
on Nov 25, 2015 at 22:42 UTC ( [id://1148626]=note: print w/replies, xml ) | Need Help?? |
Of course, ($digits$i - 1 == $digits$i + 1) should be ($digits[$i] - 1 == $digits[$i + 1]). They give you that preview button for a reason, don't they?
In Section
Seekers of Perl Wisdom
|
|