# HEC-RAS Replacement Perl Script # This will find and replace values in the HEC-RAS geometry file for modified culvet barrels. The process is: # 1. In existing model file (HECRAS_Ex.txt) find where there is a "Connection Culv" (this is the line that needs to be replaced) # 2. It then down for the next Conn Culvert Barrel line (this is the unique identifier) # 3. It then takes from the new culvert file (culvNEW.txt) the new "Connection Culv" line and replaces it in the existing HECRAS_Ex.txt file. # 4. Repeats for all and then saves out Output_HECRAS.txt # Nomenclature for running Perl Script: # C:\MyDir> perl PERL_SCRIPT.pl culvNEW.txt HECRAS_Ex.txt OutPut_HECRAS.txt # Read Existing HEC-RAS Geometry File (HECRAS_Ex) with Old Culvert Connection Attributes open (TEMPLATE, @ARGV[1]) or die; @HECRAS_Ex =