Next | Program Repair Shop | 246 |
sub cleanup { my $i = shift; my ($bits) = $i =~ /=\s*"(.*)"/s; $bits =~ tr/01//cd; return [ split //, $bits ] }
Here's another strategy:
sub cleanup { my $i = shift; $i =~ s/.*=//s; $i =~ tr/01//cd; return [ split //, $i ] }
Which do you prefer?
Next | Copyright © 2002 M. J. Dominus |