#! perl -slw use strict; $/ = ';'; while( ) { m[ create\s+table\s+ (?:"[^"]+"\.)* #" ( \S+ ) \s* \( \s* ( .+ ) \s* \) ]smx or warn "*** No match '$_'" and next; print "$1.$_" for map{ m[(\S+)] and $1 } split ',\s*', $2; print "\n------\n"; } __DATA__ create table "metrica".vodafone_capacity_cell_count_week ( nc_id integer, cell_id varchar(50) not null , week_of integer not null , busy_hour "informix".utime, gsm_tch_cong_pc_range_1 integer, gsm_tch_cong_pc_range_2 integer, gsm_tch_cong_pc_range_3 integer, gsm_sdcch_cong_pc_range_1 integer, gsm_sdcch_cong_pc_range_2 integer, gsm_sdcch_cong_pc_range_3 integer, gsm_sdcch_cong_pc_range_4 integer, gsm_hr_tch_util_pc_range_1 integer, gsm_hr_tch_util_pc_range_2 integer, gsm_hr_tch_util_pc_range_3 integer, gsm_hr_tch_util_pc_range_4 integer, gsm_hr_tch_util_pc_range_5 integer, gprs_cong_pc_range_1 integer, gprs_cong_pc_range_2 integer, gprs_cong_pc_range_3 integer, config_tch integer, config_fpdch integer, config_trx integer, config_layer integer, cell_type varchar(25) default null ); #### vodafone_capacity_cell_count_week.nc_id vodafone_capacity_cell_count_week.cell_id vodafone_capacity_cell_count_week.week_of vodafone_capacity_cell_count_week.busy_hour vodafone_capacity_cell_count_week.gsm_tch_cong_pc_range_1 vodafone_capacity_cell_count_week.gsm_tch_cong_pc_range_2 vodafone_capacity_cell_count_week.gsm_tch_cong_pc_range_3 vodafone_capacity_cell_count_week.gsm_sdcch_cong_pc_range_1 vodafone_capacity_cell_count_week.gsm_sdcch_cong_pc_range_2 vodafone_capacity_cell_count_week.gsm_sdcch_cong_pc_range_3 vodafone_capacity_cell_count_week.gsm_sdcch_cong_pc_range_4 vodafone_capacity_cell_count_week.gsm_hr_tch_util_pc_range_1 vodafone_capacity_cell_count_week.gsm_hr_tch_util_pc_range_2 vodafone_capacity_cell_count_week.gsm_hr_tch_util_pc_range_3 vodafone_capacity_cell_count_week.gsm_hr_tch_util_pc_range_4 vodafone_capacity_cell_count_week.gsm_hr_tch_util_pc_range_5 vodafone_capacity_cell_count_week.gprs_cong_pc_range_1 vodafone_capacity_cell_count_week.gprs_cong_pc_range_2 vodafone_capacity_cell_count_week.gprs_cong_pc_range_3 vodafone_capacity_cell_count_week.config_tch vodafone_capacity_cell_count_week.config_fpdch vodafone_capacity_cell_count_week.config_trx vodafone_capacity_cell_count_week.config_layer vodafone_capacity_cell_count_week.cell_type ------ *** No match ' ' at c:\test\junk3.pl line 6, chunk 3.