in reply to How to make changes in yaml file thorugh perl

Sounds like you are manipulating the file contents instead of using the official API.
use YAML qw(LoadFile DumpFile); my $ref = LoadFile 'name'; $ref->{modify} = 'something'; DumpFile 'name', $ref;