in reply to Re^2: Match all Non-0 and Letters
in thread Match all Non-0 and Letters
Perhaps something like:
And the first part of the conditional could actually be replaced by a string inequality operator rather than a regex:print "Word $Disc is corrupt!\n" if $D1 !~ /^0{7}$/ or $D2 !~ /[0-9]/;
Update: s/instead or "or"/instead of "or"/;. Thanks to Discipulus for pointing out the typo.print "Word $Disc is corrupt!\n" if ($D1 ne '0' x 7) or $D2 !~ /[0-9]/ +;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Match all Non-0 and Letters
by AnomalousMonk (Archbishop) on Jun 24, 2017 at 18:44 UTC |