in reply to how to split input data ?
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to split input data ?
by bh_perl (Monk) on Nov 09, 2006 at 02:05 UTC | |
by thezip (Vicar) on Nov 09, 2006 at 02:09 UTC |