Adrick has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Trying to get something done
by dws (Chancellor) on May 16, 2001 at 08:49 UTC
    ... I can't get this to work, I have tried for more than a week now.

    Show us what (code) you've got, or explain what you've tried to do, and we'll work with you from there.

Re: Trying to get something done
by Banky (Acolyte) on May 16, 2001 at 09:17 UTC
    This is untested but might do the job or come close
    use File::Copy; my @files=<*.dat>; foreach my $file (@files){ open FILE, "<$file" or die "Error $!"; my $fn; while(<FILE>){ last if ($fn)=$line=~/0 Name: (\w+\.\w+)/; } close FILE; move($file, $fn) if $fn and $fn ne $file; }