in reply to Re^2: Regex to extract number from text file
in thread Regex to extract number from text file

That's a bit of surprise to me, because for me it prints
Missing right curly or square bracket at /home/moritz/foo.pl line 10, +at end of line syntax error at /home/moritz/foo.pl line 10, at EOF Execution of /home/moritz/foo.pl aborted due to compilation errors.

Please use <code>...</code> tags around code examples that you put here, and also make sure to copy & paste them from your actual script to not introduce some bugs by incorrectly writing it down.

Also please start your scripts with

use strict; use warnings;

And you'll get at least a warning about what you're doing wrong.