U
usaims
Hello:
I am writing a script to make sure that numbers in a file are all
identical. However the script below is an infinite loop, how do I break
out of it once it hits the last element of the array? I have searched
perldoc but didn't really see anything. Am I on the right track?
#!/usr/bin/perl -w
use strict;
use warnings;
my @array = (<DATA>);
chomp(@array);
for (my $x = $array[0];$x <= $array[8]; $array[0]++)
{
print "They are even.\n";
}
__END__
1207553365
1207553365
1207553365
1207553365
1207553365
1207553365
1207553365
1207553365
1207553365
I am writing a script to make sure that numbers in a file are all
identical. However the script below is an infinite loop, how do I break
out of it once it hits the last element of the array? I have searched
perldoc but didn't really see anything. Am I on the right track?
#!/usr/bin/perl -w
use strict;
use warnings;
my @array = (<DATA>);
chomp(@array);
for (my $x = $array[0];$x <= $array[8]; $array[0]++)
{
print "They are even.\n";
}
__END__
1207553365
1207553365
1207553365
1207553365
1207553365
1207553365
1207553365
1207553365
1207553365