in reply to Re^2: substitute space to 0
in thread substitute space to 0
You have too old a perl, try
#!/usr/bin/perl # https://perlmonks.org/?node_id=1220510 use strict; use warnings; while( <DATA> ) { s/(^| )(?!\d)/$&0/g; print; } __DATA__ 1 2 2 5 4 4 4 4 4 3 4 4 1 1 5 6 4
|
|---|