]> git.donarmstrong.com Git - biopieces.git/blobdiff - bp_bin/read_tab
added nifty # detail to read_tab
[biopieces.git] / bp_bin / read_tab
index 3c782303d101c2da9d14afaebab7dac2f9857119..f223523b2c05c91cdda384011217360ce0243018 100755 (executable)
@@ -70,7 +70,16 @@ if ( $options->{ 'data_in' } )
             next;
         }
 
-        next if $line =~ /^#|^$/;  # skip comment lines beginning with # and skip empty lines.
+        next if $line =~ /^$/;  # skip empty lines.
+
+        if ( $line =~ /^#.+/ and not defined $options->{ 'keys' } )
+        {
+            $line = substr $line, 1;
+
+            $options->{ 'keys' } = [ split /$options->{'delimit'}/, $line ];
+
+            next;
+        }
 
         chomp $line;