in reply to Add whitespace in middle of string (substr?)

If all the numbers have the same length, substr is a good tool. Use the four-argument version to modify the string, just add a space at position 8, replacing 0 characters:
#!/usr/bin/perl use warnings; use strict; while (my $number = <DATA>) { substr $number, 8, 0, ' '; print $number; } __DATA__ +12 34567890 +23 45678901 +34 56789012 +45 67890123 +56 78901234