#!/usr/bin/perl -w use strict; my $prefix = '-20041202'; my @types = qw(BSC SBSCSubsystem MCBTSSubsystem); eval 'open ('.$_.',">'.$_.'") or die($!)' for @types; die $@ if $@; while(<*>) { my $t_fname = $_; next if ($t_fname eq '.' or $t_fname eq '..'); $t_fname =~ /^$_$prefix/ and eval('print ('.$_.' $t_fname.chr 10)' +) for @types; }
In reply to Re: Sorting names using Regular Expressions and placing them in different Files.
by alpha
in thread Sorting names using Regular Expressions and placing them in different Files.
by Kiran Kumar K V N
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |