Update: in response to to OP's update, read http://sscce.orguse warnings; use strict; my %results = (a => 1); foreach my $var (keys %results) { while (my $attr_line = <DATA>) { if ($attr_line =~ /^\Q$var/ ) { print $attr_line; } } } __DATA__ a|12 a[11]|1 a[11][11]|0 b|2 c|0
In reply to Re: Parsing for [] in a file
by toolic
in thread Parsing for [] in a file
by HJ
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |