If you want to pick a line based on the number, you should extract that number from the line and then do a numerical comparison:
$line=~/^(\d+):/; if( $1==$input ){ ...
In reply to Re: pattern string match while reading from the file
by hdb
in thread pattern string match while reading from the file
by perlDevsWorld
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |