in reply to Sorting names using Regular Expressions and placing them in different Files.
do what you need? If not, please try to clearly state what part of your spec it does not meet and what needs to be changed.#!/usr/bin/perl use strict; use warnings; my %files = ( 'BSC' => 1, 'SBSCSubsystem' => 1, 'MCBTSSubsystem' => 1 +); no strict 'refs'; ( open ( $$_, '>', $_ ) or die "$_: $!\n") for ( keys %files ); my ( $dest, $date ); while ( <> ) { ( $dest, $date ) = split /-/, ((split /\s+/)[8]); print "dest: $dest\n"; ( print ${$dest} ( $_ ) ) if exists $files{$dest}; }
|
|---|