Skip to content

Instantly share code, notes, and snippets.

@gbacon
Created May 8, 2011 03:35
Show Gist options
  • Save gbacon/961076 to your computer and use it in GitHub Desktop.
Save gbacon/961076 to your computer and use it in GitHub Desktop.
if ($data =~ /^\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*(-?\d+)\s*$/) {
my($x,$y,$z) = ($1,$2,$3);
...;
}
else {
die "$0: $ARGV:$.: unexpected format";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment