Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
my @array1 = `cat $ARGV[0]`; my @array2 = 'cat $ARGV[1]'; my $read01 = 0; #$i = 'BIG TREE' my $read01 = 0; foreach my $i (@array1){ for(@array2){ chomp($i); $read01++ if $read01; s/./ . /g; if ($_ =~ /CREATE TABLE TEMP.$i/){ $read01 = 1; } $read01 = 0 if (/^----/) ; next if ($read01 == 1); next unless $read01; print "$_"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: between pattern search not working
by roboticus (Chancellor) on Jan 15, 2015 at 12:44 UTC | |
|
Re: between pattern search not working
by Eily (Monsignor) on Jan 15, 2015 at 12:28 UTC | |
by Anonymous Monk on Jan 15, 2015 at 12:39 UTC | |
|
Re: between pattern search not working
by BillKSmith (Monsignor) on Jan 15, 2015 at 14:22 UTC | |
by Anonymous Monk on Jan 15, 2015 at 19:24 UTC | |
by BillKSmith (Monsignor) on Jan 15, 2015 at 20:29 UTC | |
by Anonymous Monk on Jan 15, 2015 at 21:06 UTC | |
by Anonymous Monk on Jan 16, 2015 at 11:59 UTC | |
|
Re: between pattern search not working\e^DiOnline perltidy
by Anonymous Monk on Jan 15, 2015 at 12:27 UTC |