Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Trouble understanding pack/unpack syntax.

by grep (Monsignor)
on Jul 02, 2007 at 03:36 UTC ( [id://624368]=note: print w/replies, xml ) Need Help??


in reply to Trouble understanding pack/unpack syntax.

but my suspicion is that the A16 will give me 16 separate array elements

Why would you think that? Test it out.

#/usr/bin/perl use strict; use warnings; use Data::Dumper; my $line = "FooBarBaz"; my @array = unpack('A3A3A3',$line); print Dumper \@array;
Produces:
$VAR1 = [ 'Foo', 'Bar', 'Baz' ];
So A16 will produce 1 element.

As to your signature: I would suggest reading something I wrote earlier.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://624368]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-25 15:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found