#!/usr/bin/perl use strict; use warnings; my @list = qw( 1 3 5 4 2 6 7 8 9); my %hash; @hash{@list}=1; delete $hash{$_} for (1..@list); print "is sequence\n" unless %hash;
cLive ;-)
In reply to Re: Validate array of numbers in sequence
by cLive ;-)
in thread Validate array of numbers in sequence
by AcidHawk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |