Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
Keep It Simple, Stupid
 
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.


Comment on Re: Trouble understanding pack/unpack syntax.
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2014-04-21 01:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (489 votes), past polls