Because there isn't a semicolon in your $line:
$line =~ s/^\$mypic\[0\] = \"(\w{3})\"$/$1/g;
works.
That's one reason why I often use if() around my regexp stuff.
{NULE}
Update: Wow, two other people replied before I could type mine up. Aren't we a speedy crew? :)
--
http://www.nule.org
In reply to Re: regex matching with $1
by {NULE}
in thread regex matching with $1
by c
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |