Pattern matching problem. This time, it doesn’t print out any thing
and just soaks up my CPU. I tried slowly adding more and more for it
to do, and it worked great – until TABLE7. Then it just soaks up my
CPU and makes me cry. At first, when nothing was printing, I added
$stdout.flush to make it print. But it didn’t print! This makes me
think that it’s something in the when part.
Whats going on?
Help!
lines.each do |line|
case line
when /
^"(.)","(.)","(.)","(.)","(.)","(.)","(.)","(.)","(.)","(.)","
(.)","(.)","(.)","(.)","(.)","(.)","(.)","(.)","(.)","(.)","(.
)","(.)","(.)","(.)","(.)","(.)","(.)","(.)","(.)","(.)","(.)
“,”(.)"$/
TABLE1.puts(""#{$1}","#{$2}","#{$3}","#{$4}","#{$5}",
“#{$6}”,"#{$7}","#{$8}","#{$9}""); print ‘-’; $stdout.flush
TABLE2.puts(""#{$10}","#{$11}","#{$12}"");
print ‘-’; $stdout.flush
TABLE3.puts(""#{$13}","#{$14}","#{$15}"");
print ‘-’; $stdout.flush
TABLE4.puts(""#{$16}","#{$17}
“”); print ‘-’; $stdout.flush
TABLE5.puts(""#{$18}","#{$19}
“”); print ‘-’; $stdout.flush
TABLE6.puts(""#{$20}","#{$21}
“”); print ‘-’; $stdout.flush
TABLE7.print(""#{$22}","#{$23}
“”); print’!’; $stdout.flush
TABLE7.print(""#{$24}","#{$25}
“”); print’!’; $stdout.flush
TABLE7.print(""#{$26}","#{$27}
“”); print’!’; $stdout.flush
TABLE7.print(""#{$28}","#{$29}
“”); print’!’; $stdout.flush
TABLE7.print(""#{$30}","#{$31}","#{$32}"");
print ‘-’; $stdout.flush
TABLE8.puts(""#{33}","#{34}
“”); print ‘-’; $stdout.flush
puts;
$stdout.flush
print
‘.’;
$stdout.flush
else
print ‘$’
end
end
-------------------------------------------------------|
~ Ari
crap my sig won’t fit