#!/usr/bin/perl open(MOVED, "< /usr/ports/MOVED"); while () { next if (m/^#/); chomp(); my ($port, $newloc, $date, $why) = split(/\|/, $_); print "Port: $port -> " . ( (length($newloc) > 0) ? $newloc : "REMOVED") . "\n"; print "Date: $date\n"; print "Reason: $why\n"; print "\n"; }