short answer first.....how to match a number in a string.<br><br>While this stuff can get very concise, for clarity, I will be a little verbose.<br><br><i><br>$string = 'NET "clk" PERIOD = 9ns'; <br>$string =~ /\d+/; # matches the first set of digits found in the string<br>$number = $&; # $& contains the matched value<br></i><br><br>if you want to be a little more selective about what you match.....<br><i><br>$string = 'NET "clk" PERIOD = 9ns'; <br>$string =~ /NET "clk" PERIOD = (\d+)ns/; # catch the digits in $1<br>$number = $1; # $1 contains the value matched in the first set of paren's.<br></i><br><br>For Perl RegEx stuff <br>The O'Reilly "Programming Perl" book has the functional basics<br>and<br> "Mastering Regular Expressions" by Jeffrey E.F. Friedl,Andy Oram (Editor) also from O'Reilly & Associates goes into excruciating detail.<br><br>.