The stupid question is the question not asked | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
If changing the 5 to 4 yields '0.0', then I think it's actually yielding ' 0.0' (that's space-zero-dot-zero), which means your offset of 118 might be wrong.
The reason your code is failing, in general, is because your logic is faulty. You think your code is saying "print the contents of the array if there's a line with '0.00' at offset 118", but your code is NOT saying that. Your code is saying: Your code is faulty because it won't print any line that DOESN'T have '0.00' in it. I suggest you try my sample solution and plug in the values for $target, $pos, 'START', and 'END'. Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker Nos autem praedicamus Christum crucifixum (1 Cor. 1:23) - The Cross Reference (My Blog) In reply to Re^5: Regex Not Grabbing Everything
by japhy
|
|