You can use the $n variables.while (<CONFIG_FILE>) { if(/^frz\s+=\s+(\w+)\;/) $bar = $1; } } print "$bar\n";
In reply to Re: Special Variable Pattern Match whilst reading input from a file
by zby
in thread Special Variable Pattern Match whilst reading input from a file
by Withnail
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |