I'm really new to programming and I have two number arrays (ex. array1 = 13, 29, 545 array2 = 5,7,9 etc). I want to see which numbers in array 1 are not divisible by any of the numbers in array 2. Is there an easy way to do this?
Thanks
Update:
Marinersk: *very* new. I've read the basic perl usage info. I know what arrays and hashes are and how to declare variables and print things and the very basic stuff, but I find a lot of the perl manuals go straight from very basic "this is how to declare a variable" to really complex code I don't understand and are missing a lot of the middle ground. Thanks so much!
Here is my script, and it works. Thanks for the help!
#!/usr/bin/perl
use strict;
use warnings;
my @array1 = (3, 5, 7, 9);
my @array2 = (13, 29, 35, 55, 71, 545);
foreach(@array1)
{
my $num1 = $_;
foreach(@array2)
{
my $num2 = $_;
if($num2 % $num1 == 0)
{
print "$num2 is divisible by $num1 \n";
}
else
{
print "$num2 is not divisible by $num1 \n";
}
}
}