aboutsummaryrefslogtreecommitdiffstats
path: root/old/cable_labels.pl
diff options
context:
space:
mode:
Diffstat (limited to 'old/cable_labels.pl')
-rw-r--r--old/cable_labels.pl16
1 files changed, 16 insertions, 0 deletions
diff --git a/old/cable_labels.pl b/old/cable_labels.pl
new file mode 100644
index 0000000..b461d03
--- /dev/null
+++ b/old/cable_labels.pl
@@ -0,0 +1,16 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+my ($rows, $switches, $cables) = @ARGV;
+
+for my $row (1 .. $rows) {
+ next if (!($row & 1));
+
+ for my $switch (1 .. $switches) {
+ for my $cable (1 .. $cables) {
+ print join('-', ($row, $switch, $cable)) . ';' . "\n";
+ }
+ }
+}