Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

regular expressions

tonyntonyn Posts: 7Member
Hi,

I have a file name which have these lines in the file. I want to compare if the schematic port and layout port are different then I report this file has port name different. Below is my code but it has problem with $1 and $2. How can I get $1 and $2?

thanks,
Tony


while () {
$port_session = 1 if ( /ports*Port classs*Schematic ports*Layout port/ ) ;
if ( /*s+d+s+(S+) (S+)$/ && $port_session ) {
$mismatch = 1 if ( $1 !~ $2 );
}
}

close(INF);








port Port class Schematic port Layout port
---------- ---------- -------------------- --------------------
L 1 D D
L 4 Q Q
L 6 RST x_6
L 5 SET SET
L 2 XCLK x_3
L 3 XQ XQ

Comments

Sign In or Register to comment.