Skip to content

Instantly share code, notes, and snippets.

@delonnewman
Created January 6, 2009 21:37
Show Gist options
  • Save delonnewman/44011 to your computer and use it in GitHub Desktop.
Save delonnewman/44011 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings;
my $cols = 2;
my $items = 7;
my $num_cols = 0;
my $num_items = 0;
for (1..3) {
print "#$_#\n";
for (1..20) {
print;
$num_items++;
if ($num_items == $items) {
print "end col\n";
$num_items = 0;
$num_cols++;
if ($num_cols == $cols) {
print "break loop\n";
$num_cols = 0;
last;
}
}
}
print "after loop\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment