#!/usr/intel/bin/perl use warnings; use strict; my $find_flag; #using a flag variable my ($iFile, $oFile, $replacement) = @ARGV; open my $iHandle, '<', $iFile or die $@; open my $oHandle, '>', $oFile or die $@; while ( <$iHandle> ){ if (/^\S/){ #match a line that start wit +h no space if (/^\w+clk\[\d+\]/){ #match requested headline $find_flag = 0; } else{ $find_flag = 1; } } next if $find_flag and s/\s+QUALIFIED_CLOCK/$replacement/; #skip +s the line requested print $oHandle $_; #printing ordinary line }
In reply to Re: Command Line
by holli
in thread Command Line
by guyov1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |