in reply to unitialized value error in pattern matching script

I guess your code is really
while ($_myfile[$i] !~ /filename="(.*)\.(.*)"/) { $args1=$1; $args2=$2; print $args2; $i++; }
with the closing / on the regex?

The problem is that !~ means DON'T match. What you want is probably

while ($_myfile[$i] =~ /filename="(.*)\.(.*)"/) { $args1=$1; $args2=$2; print $args2; $i++; }
Hope this helps!
--
Mike