#!/usr/bin/perl -w
$target = $ARGV[0];
$newval = $ARGV[1];
$section =" PhatBox";
while (<STDIN>) {
  $line = $_;
  if ($line =~ /\[(.*)\]/) {
    $section = $1;
  }
  if (($section =~ /^$target$/i) && ($line =~ /num_discs=/)) {
    $line="num_discs=$newval\n";
  }
  print $line;
}
