I was going to suggest 3-args split, but BrowserUK already did that. So here's another way using a regexp:
... if ($line =~ /^(\w+)=(["'])(.*)\2$/) { my $key = $1; my $value = $3; ... }
Basically it does the same as the 3-args split, but additionally it strips the quotes. (\2 refers to (["']) and makes sure the quotes are balanced)
In reply to Re: Extracting strings around comparision operator
by Monk::Thomas
in thread Extracting strings around comparision operator
by rahulruns
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |