in reply to Pack command

mosh,
I am going to forget for a second you said IP address and that you want to use pack.
my $new = join '', map { sprintf('%.2d', $_) } split /\./, $ip;
If you really want the spaces just change the first argument to join. I am not great at pack/unpack so I use what I know works. I question what you would want to happen if you have 3 digit octets?

Cheers - L~R

Replies are listed 'Best First'.
Re^2: Pack command
by mosh (Scribe) on Apr 18, 2005 at 14:06 UTC
    I found the answer !!
    it is 'a4'
    Thanks anyway.
    Mosh.