xiaoyafeng has asked for the wisdom of the Perl Monks concerning the following question:
why we need to add a 'pack/unpack' behavior while transfering data? in my opnion,I could transfer variable directly.my $buf = pack( 'NA*', length( $msg ), $msg ); #sender my ($len_msg,$msg) = unpack('NA*',$buf);#receiver
Please tell me what there is in $ps.$status = "11010101"; $ps = pack('b16',$stauts); print "$ps\n"; #junk char!!!!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: question of pack.
by planetscape (Chancellor) on Dec 26, 2006 at 08:05 UTC | |
|
Re: question of pack.
by gaal (Parson) on Dec 26, 2006 at 06:59 UTC | |
|
Re: question of pack.
by thevoid (Scribe) on Dec 26, 2006 at 13:28 UTC | |
by liverpole (Monsignor) on Dec 26, 2006 at 14:53 UTC | |
by thevoid (Scribe) on Dec 26, 2006 at 15:42 UTC | |
by thevoid (Scribe) on Dec 27, 2006 at 09:40 UTC | |
|
Re: question of pack.
by ikegami (Patriarch) on Dec 28, 2006 at 03:24 UTC | |
|
Re: question of pack.
by xiaoyafeng (Deacon) on Dec 28, 2006 at 01:55 UTC |