This should do what you're looking for:
#!/usr/bin/perl use strict; use warnings; my $data = "123456789"; # get two digits, and replace them with two digits # and a space (globally repeating until the end of # the string) $data =~ s/(\d{2})/$1 /g; print $data, "\n";
jd
In reply to Re: how to split input data ?
by thezip
in thread how to split input data ?
by bh_perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |