fork(1) download
  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4. my @array1 = qw(1 2 3 4 5 6 );
  5. my @array2 = qw(0.1 0.2 0.3 0.4 0.5 0.6);
  6. foreach my $item (@array1){
  7. foreach (@array2){
  8. print "$item with $_\n";
  9. }
  10. print "\n";
  11. }
Success #stdin #stdout 0s 6176KB
stdin
Standard input is empty
stdout
1 with 0.1
1 with 0.2
1 with 0.3
1 with 0.4
1 with 0.5
1 with 0.6

2 with 0.1
2 with 0.2
2 with 0.3
2 with 0.4
2 with 0.5
2 with 0.6

3 with 0.1
3 with 0.2
3 with 0.3
3 with 0.4
3 with 0.5
3 with 0.6

4 with 0.1
4 with 0.2
4 with 0.3
4 with 0.4
4 with 0.5
4 with 0.6

5 with 0.1
5 with 0.2
5 with 0.3
5 with 0.4
5 with 0.5
5 with 0.6

6 with 0.1
6 with 0.2
6 with 0.3
6 with 0.4
6 with 0.5
6 with 0.6