my $file = $foo_bar_file; open (FILE,"<$file") || die $!; read FILE, my $text, -s $file; close(FILE); if($text =~ /(.*?)/sg) { print $1; }