Hello, tybalt89, Thank you so much for your great help! My file is very big. How can I use your code? Thank you so much!
#!/usr/bin/perl # https://perlmonks.org/?node_id=1220510 open(IN1, "tmp01") || die "Cannot open this file"; @lines = <IN1>; use strict; use warnings; while( <IN1> ) { s/(^| \K)(?!\d)/0/g; print; }
2018-08-19 Athanasius restored content
In reply to Re^2: substitute space to 0
by yueli711
in thread substitute space to 0
by yueli711
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |