Skip to content

Instantly share code, notes, and snippets.

@dcoder2099
Created August 30, 2010 15:24
Show Gist options
  • Save dcoder2099/557551 to your computer and use it in GitHub Desktop.
Save dcoder2099/557551 to your computer and use it in GitHub Desktop.
# walk down a file until you get to the data section, then suck it in
# (presumes data section is preceded by a row of separator-dashes. :)
while(<>) {
chomp;
until (/-------------------- ------------------/) { ; } # do nothing until we get these
while(<>) {
chomp;
($object_id, $description) = ($1, $2) if m/(\d+)\s+(\w+)/;
print "$object_id, $description\n";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment