my $strip = '\x0'; $strip .= '\d+' if $table->cell($rownum, 0..2) =~ $strip; $table->strip( $strip, $rownum, 0..2 ); #### # The ... indicates "Whatever" - it's not meant to be syntatically-correct Perl. sub strip { my $self = shift; my ($pattern, ... ) = @_; $self->{cells}[...] =~ s/$pattern//; }