From: Ian Jackson Date: Thu, 28 Feb 2019 01:23:44 +0000 (+0000) Subject: export some more stuff from Parse X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=3d713cadd11b2157c2fe4068383ade97ca817233;p=pandemic-rising-tide.git export some more stuff from Parse --- diff --git a/Parse.pm b/Parse.pm index 51cb1fa..c3ca96b 100644 --- a/Parse.pm +++ b/Parse.pm @@ -8,7 +8,7 @@ use Graph; use Exporter; our @ISA = qw(Exporter); -our @EXPORT = qw(parse_input_graph o %region %adj); +our @EXPORT = qw(parse_input_graph o plag_prs %region %adj); our %region; # $region{NAME}{Colour} @@ -162,6 +162,14 @@ sub edge_id_to_other_id ($$) { sub o { print @_ or die $!; } +sub plag_prs ($) { + my ($t) = @_; + $t = $` if $t =~ m/\n/; + $t =~ s/ //g; + $t =~ s/-//g; + return "$t"; +} + sub parse_input_graph () { read_in(); resolve_arefs();