#!/usr/bin/perl use strict; use warnings; @ARGV == 2 or die "USAGE :: perl max_tran_update.pl <> <> \n\n"; my $cell_list = $ARGV[0]; # input cell_list my $pvt_list = $ARGV[1]; # input pvt_list open CFILE, '<', $cell_list or die "Can not open cell_list because: $!"; open PFILE, '<', $pvt_list or die "Can not open pvt_list because: $!"; my @cell_file = map s/\s+\z/_X/r, ; while ( ) { chomp; print join( ' ', map s/_\k.+\z/$_/r, @cell_file ), "\n"; }