in reply to Altering data files

You don't really want to do it this way, of course... But I noticed that your data structure is very similar to Perl code, so...

use strict; use warnings; $_ = do { local $/; <> }; s/" "/" => "/g; s/"\s{/" => {/g; s/}/},/g; s/;/,/g; my $ds = eval "{$_}"; # Danger, Will Robinson! my $new_sequence = "sequence.V6_0"; # or whatever. for ( values %$ds ) { $_->{'StrCatDone'} eq '1' and $_->{'seq_name'} = $new_sequence; } use Data::Dumper; # go as far as we can using Data::Dumper's output options... $Data::Dumper::Indent = 0; $Data::Dumper::Terse = 1; $Data::Dumper::Pair = " "; $_ = Dumper $ds; # ...and do the rest by hand: s/,/\n/g; s/ {/\n{\n/g; s/}/\n}/g; s/'/"/g; s/{(.*)}/$1/s; print

Execute the above with perl -i.bak.

We're building the house of the future together.