in reply to RegExp eating my $1 - FIXED!

Once I fixed the error revealed by using

use strict; use warnings;

mydata_$GPVTG.txt successfully gets created from mydata.txt.

You have other problems, though. Starting with foreach my $key(%files) iterating over keys and values. I'll give you a chance to try to fix them.

By the way,

local *FH; open (FH, ...) or die; $files{$ffc} = *FH;
can be written as
open ($files{$ffc}, ...) or die;

Replies are listed 'Best First'.
Re^2: RegExp eating my $1
by thekestrel (Friar) on Jul 31, 2008 at 21:39 UTC
    Gosh, it has been a while since I've written a perl script, I can't believe for didn't use strict or warnings. I'll wade through the warnings and find my undoing...