my $MAL = '^"_.*"$';
Is that what you want? ^ matchs the start of a line and $ matches the end. So this matches lines that only contain your string. As I read your spec, your string was only part of the line - in which case my solution might work better.
Update: Hmm... not sure why I'm being downvoted here as it looks to me like I'm pointing out the problem that liverpole spotted and fixed half an hour later. If someone could be polite enough to explain what they see as the problem then I'd appreciate it.
"The first rule of Perl club is you do not talk about Perl club." -- Chip Salzenberg
In reply to Re^5: script to grab string from log and print them in a different log
by davorg
in thread script to grab string from log and print them in a different log
by perl_geoff
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |