Next | Trivial Utilities | 58 |
seq_write is similar to seq_read:
sub seq_write { my ($seqname, $data) = @_; my $newline = "$seqname: " . $data->run_list;
for my $n (0 .. $#SEQUENCE) { for ($SEQUENCE[$n]) { if (/^\Q$seqname\E:\s+/) { $_ = $newline; return; } } } push @SEQUENCE, $newline; }
Assigning to $_ (or doing push) modifies the file
Next | Menu | Copyright © 2012 M. J. Dominus |