(F) The "use" keyword is recognized and executed at compile time, and returns
no useful value. See L<perlmod>.
-=item '_' allowed only after types %s
+=item '!' allowed only after types %s
-(F) The '_' is allowed in pack() and unpack() only after certain types.
-See L<perlfunc>.
+(F) The '!' is allowed in pack() and unpack() only after certain types.
+See L<perlfunc/pack>.
=item % may only be used in unpack
#endif
if (isSPACE(datumtype))
continue;
- if (*pat == '_') {
+ if (*pat == '!') {
char *natstr = "sSiIlL";
if (strchr(natstr, datumtype)) {
pat++;
}
else
- croak("'_' allowed only after types %s", natstr);
+ croak("'!' allowed only after types %s", natstr);
}
if (pat >= patend)
len = 1;
#endif
if (isSPACE(datumtype))
continue;
- if (*pat == '_') {
+ if (*pat == '!') {
char *natstr = "sSiIlL";
if (strchr(natstr, datumtype)) {
pat++;
}
else
- croak("'_' allowed only after types %s", natstr);
+ croak("'!' allowed only after types %s", natstr);
}
if (*pat == '*') {
len = strchr("@Xxu", datumtype) ? 0 : items;
my $nsem = 10;
- semctl($sem,0,SETALL,pack("s_*",(0) x $nsem)) or print "not ";
+ semctl($sem,0,SETALL,pack("s!*",(0) x $nsem)) or print "not ";
print "ok 10\n";
$data = "";
semctl($sem,0,GETALL,$data) or print "not ";
print "ok 11\n";
- print "not " unless length($data) == length(pack("s_*",(0) x $nsem));
+ print "not " unless length($data) == length(pack("s!*",(0) x $nsem));
print "ok 12\n";
- my @data = unpack("s_*",$data);
+ my @data = unpack("s!*",$data);
my $adata = "0" x $nsem;
my $poke = 2;
$data[$poke] = 1;
- semctl($sem,0,SETALL,pack("s_*",@data)) or print "not ";
+ semctl($sem,0,SETALL,pack("s!*",@data)) or print "not ";
print "ok 14\n";
$data = "";
semctl($sem,0,GETALL,$data) or print "not ";
print "ok 15\n";
- @data = unpack("s_*",$data);
+ @data = unpack("s!*",$data);
my $bdata = "0" x $poke . "1" . "0" x ($nsem-$poke-1);
# 73..78: packing native shorts/ints/longs
-print "not " unless length(pack("s_", 0)) == $Config{shortsize};
+print "not " unless length(pack("s!", 0)) == $Config{shortsize};
print "ok ", $test++, "\n";
-print "not " unless length(pack("i_", 0)) == $Config{intsize};
+print "not " unless length(pack("i!", 0)) == $Config{intsize};
print "ok ", $test++, "\n";
-print "not " unless length(pack("l_", 0)) == $Config{longsize};
+print "not " unless length(pack("l!", 0)) == $Config{longsize};
print "ok ", $test++, "\n";
-print "not " unless length(pack("s_", 0)) <= length(pack("i_", 0));
+print "not " unless length(pack("s!", 0)) <= length(pack("i!", 0));
print "ok ", $test++, "\n";
-print "not " unless length(pack("i_", 0)) <= length(pack("l_", 0));
+print "not " unless length(pack("i!", 0)) <= length(pack("l!", 0));
print "ok ", $test++, "\n";
-print "not " unless length(pack("i_", 0)) == length(pack("i", 0));
+print "not " unless length(pack("i!", 0)) == length(pack("i", 0));
print "ok ", $test++, "\n";
# 79..138: pack <-> unpack bijectionism