in reply to Remove unwanted chars and maintain table integrity
I think another Monk can take it from here in a TIMTOWDI, I was trying my luck (Depleted my Resources too...), my code needs improvement still and it doesn't exactly achieve the goal but I just thought I would post this for other Monks to look at and provide guidance, this only removes the Ws from the code but with untamed indiscrimination ('Watson' becomes 'atson')...
Interesting problem indeed...
use strict; my @array; while(@array = <DATA>){ chomp; for(my $i =0;$i<=scalar(@array);$i++){ my @data = split(//,$array[$i]); foreach my $element (@data){ next if $element eq 'W' || !$element ; print $element; } }; # print "@data"; }
|
|---|