[Israel.pm] A regexp question
Gaal Yahas
gaal at forum2.org
Mon May 17 09:42:20 PDT 2004
On Mon, May 17, 2004 at 04:29:33PM +0000, Mikhael Goikhman wrote:
> > > $m16 = join '', map { s/^.$/0$_/; $_ } split /[:-]/, $mac;
> >
> > You forgot the ':' in the join
>
> No, please reread the original message, he wanted 16 hex digits, with no
> ":" between them.
Ach, my bad. Okay, golf as penance. -12:
s/^.$/0$_/, $m16 .= $_ for split /[:-]/, $mac;
--
Gaal Yahas <gaal at forum2.org>
http://gaal.livejournal.com/
More information about the Perl
mailing list