si_lenceuse strict; use warnings; my @lines = ( "??????????????", "123" ); my $conv; for my $line ( @lines ){ $conv=""; my @c = split('', $line); $conv .= ($c[$_] || 0) for 0..5; print "$conv\n"; }
In reply to Re: Alternative to substr on unknown length of scalar
by si_lence
in thread Alternative to substr on unknown length of scalar
by PerlingTheUK
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |