Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Trouble understanding pack/unpack syntax.

by grep (Monsignor)
on Jul 02, 2007 at 03:36 UTC ( #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
Node Status?
node history
Node Type: note [id://624368]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2016-12-06 11:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (102 votes). Check out past polls.