#!/usr/bin/perl -i.orig # Plugins and their latest versions $plugins = { 'com.google.protobuf' => '0.8.0', 'us.kirchmeier.capsule' => '1.0.2', }; while (<>) { for $plugin (keys %$plugins) { my $ver = $plugins->{$plugin}; s/^(\s*id\s*[\'\"]\Q$plugin\E[\'\"]\s*version\s*)\S+/${1}'$ver'/i; } print; }