add more routing code together with associated commands
[spider.git] / perl / DXUtil.pm
index 0b3de9511e964f41c6834f025bcf4e60b1dc2f2d..b635e9816360f1dab46605eea7ed0b0d34c1c017 100644 (file)
@@ -15,7 +15,7 @@ use Data::Dumper;
 require Exporter;
 @ISA = qw(Exporter);
 @EXPORT = qw(atime ztime cldate cldatetime slat slong yesno promptf 
-                        parray parraypairs shellregex readfilestr writefilestr
+                        parray parraypairs phex shellregex readfilestr writefilestr
              print_all_fields cltounix unpad is_callsign
                         is_freq is_digits is_pctext is_pcflag insertitem deleteitem
             );
@@ -141,6 +141,13 @@ sub promptf
        return ($priv, $prompt);
 }
 
+# turn a hex field into printed hex
+sub phex
+{
+       my $val = shift;
+       return sprintf '%X', $val;
+}
+
 # take an arg as an array list and print it
 sub parray
 {