#!/usr/bin/perl # read in command line arguments ($vfloors, $macros) = @ARGV; #open output file open (macros, ">$macros")|| die ("Unable to open $macros file for writing"); #open input file open (vfloortext,"$vfloors") || die ("Unable to open $vfloors file for reading"); print macros "~o39 "; print macros "\n~v \"varFloor1\"\n 39\n"; while ($line = ) { if ($line!="~v varFloor1"){ print macros ($line); }} close(vfloortext); close(macros);