in reply to Splitting up a string by lengths
You want unpack.
my $date = '20050725'; my ($y, $m, $d) = unpack('a4a2a2', $date); print "$y / $m / $d\n";
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Splitting up a string by lengths
by kwaping (Priest) on Jul 25, 2005 at 14:46 UTC | |
by thor (Priest) on Jul 26, 2005 at 03:24 UTC | |
by kwaping (Priest) on Jul 26, 2005 at 14:29 UTC |