$96 GRAYBYTE WORDPRESS FILE MANAGER $41

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/usr/share/perl5/

HOME
Current File : /usr/share/perl5//bytes.pm
package bytes;

our $VERSION = '1.05';

$bytes::hint_bits = 0x00000008;

sub import {
    $^H |= $bytes::hint_bits;
}

sub unimport {
    $^H &= ~$bytes::hint_bits;
}

sub AUTOLOAD {
    require "bytes_heavy.pl";
    goto &$AUTOLOAD if defined &$AUTOLOAD;
    require Carp;
    Carp::croak("Undefined subroutine $AUTOLOAD called");
}

sub length (_);
sub chr (_);
sub ord (_);
sub substr ($$;$$);
sub index ($$;$);
sub rindex ($$;$);

1;
__END__

=head1 NAME

bytes - Perl pragma to expose the individual bytes of characters

=head1 NOTICE

Because the bytes pragma breaks encapsulation (i.e. it exposes the innards of
how the perl executable currently happens to store a string), the byte values
that result are in an unspecified encoding.

B<Use of this module for anything other than debugging purposes is
strongly discouraged.>  If you feel that the functions here within
might be useful for your application, this possibly indicates a
mismatch between your mental model of Perl Unicode and the current
reality. In that case, you may wish to read some of the perl Unicode
documentation: L<perluniintro>, L<perlunitut>, L<perlunifaq> and
L<perlunicode>.

=head1 SYNOPSIS

    use bytes;
    ... chr(...);       # or bytes::chr
    ... index(...);     # or bytes::index
    ... length(...);    # or bytes::length
    ... ord(...);       # or bytes::ord
    ... rindex(...);    # or bytes::rindex
    ... substr(...);    # or bytes::substr
    no bytes;


=head1 DESCRIPTION

Perl's characters are stored internally as sequences of one or more bytes.
This pragma allows for the examination of the individual bytes that together
comprise a character.

Originally the pragma was designed for the loftier goal of helping incorporate
Unicode into Perl, but the approach that used it was found to be defective,
and the one remaining legitimate use is for debugging when you need to
non-destructively examine characters' individual bytes.  Just insert this
pragma temporarily, and remove it after the debugging is finished.

The original usage can be accomplished by explicit (rather than this pragma's
implict) encoding using the L<Encode> module:

    use Encode qw/encode/;

    my $utf8_byte_string   = encode "UTF8",   $string;
    my $latin1_byte_string = encode "Latin1", $string;

Or, if performance is needed and you are only interested in the UTF-8
representation:

    use utf8;

    utf8::encode(my $utf8_byte_string = $string);

C<no bytes> can be used to reverse the effect of C<use bytes> within the
current lexical scope.

As an example, when Perl sees C<$x = chr(400)>, it encodes the character
in UTF-8 and stores it in C<$x>. Then it is marked as character data, so,
for instance, C<length $x> returns C<1>. However, in the scope of the
C<bytes> pragma, C<$x> is treated as a series of bytes - the bytes that make
up the UTF8 encoding - and C<length $x> returns C<2>:

 $x = chr(400);
 print "Length is ", length $x, "\n";     # "Length is 1"
 printf "Contents are %vd\n", $x;         # "Contents are 400"
 {
     use bytes; # or "require bytes; bytes::length()"
     print "Length is ", length $x, "\n"; # "Length is 2"
     printf "Contents are %vd\n", $x;     # "Contents are 198.144 (on
                                          # ASCII platforms)"
 }

C<chr()>, C<ord()>, C<substr()>, C<index()> and C<rindex()> behave similarly.

For more on the implications, see L<perluniintro> and L<perlunicode>.

C<bytes::length()> is admittedly handy if you need to know the
B<byte length> of a Perl scalar.  But a more modern way is:

   use Encode 'encode';
   length(encode('UTF-8', $scalar))

=head1 LIMITATIONS

C<bytes::substr()> does not work as an I<lvalue()>.

=head1 SEE ALSO

L<perluniintro>, L<perlunicode>, L<utf8>, L<Encode>

=cut

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
16 Mar 2026 5.03 PM
root / root
0755
Attribute
--
14 Aug 2025 9.24 PM
root / root
0755
B
--
14 Aug 2025 9.24 PM
root / root
0755
CPAN
--
30 Aug 2024 10.28 PM
root / root
0755
Class
--
14 Aug 2025 9.24 PM
root / root
0755
Compress
--
31 Aug 2024 4.31 AM
root / root
0755
Config
--
14 Aug 2025 9.24 PM
root / root
0755
DBM_Filter
--
14 Aug 2025 9.24 PM
root / root
0755
Devel
--
14 Aug 2025 9.24 PM
root / root
0755
ExtUtils
--
14 Aug 2025 9.24 PM
root / root
0755
File
--
14 Aug 2025 9.24 PM
root / root
0755
Getopt
--
14 Aug 2025 9.24 PM
root / root
0755
I18N
--
14 Aug 2025 9.24 PM
root / root
0755
IO
--
14 Aug 2025 9.24 PM
root / root
0755
IPC
--
14 Aug 2025 9.24 PM
root / root
0755
Locale
--
28 Jul 2025 3.08 PM
root / root
0755
Math
--
14 Aug 2025 9.24 PM
root / root
0755
Memoize
--
14 Aug 2025 9.24 PM
root / root
0755
Module
--
14 Aug 2025 9.24 PM
root / root
0755
Net
--
14 Aug 2025 9.24 PM
root / root
0755
Pod
--
14 Aug 2025 9.24 PM
root / root
0755
Search
--
14 Aug 2025 9.24 PM
root / root
0755
Term
--
14 Aug 2025 9.24 PM
root / root
0755
Text
--
14 Aug 2025 9.24 PM
root / root
0755
Thread
--
14 Aug 2025 9.24 PM
root / root
0755
Tie
--
14 Aug 2025 9.24 PM
root / root
0755
Time
--
14 Aug 2025 9.24 PM
root / root
0755
URI
--
31 Aug 2024 4.31 AM
root / root
0755
Unicode
--
14 Aug 2025 9.24 PM
root / root
0755
User
--
14 Aug 2025 9.24 PM
root / root
0755
encoding
--
14 Aug 2025 9.24 PM
root / root
0755
overload
--
14 Aug 2025 9.24 PM
root / root
0755
pod
--
14 Aug 2025 9.24 PM
root / root
0755
unicore
--
14 Aug 2025 9.24 PM
root / root
0755
vendor_perl
--
14 Aug 2025 9.25 PM
root / root
0755
warnings
--
14 Aug 2025 9.24 PM
root / root
0755
AnyDBM_File.pm
2.557 KB
28 Jul 2025 3.07 PM
root / root
0644
AutoLoader.pm
15.427 KB
28 Jul 2025 3.07 PM
root / root
0644
AutoSplit.pm
19.177 KB
28 Jul 2025 3.07 PM
root / root
0644
Benchmark.pm
30.298 KB
28 Jul 2025 3.07 PM
root / root
0644
CORE.pod
3.113 KB
28 Jul 2025 3.07 PM
root / root
0644
DB.pm
18.479 KB
28 Jul 2025 3.07 PM
root / root
0644
DBM_Filter.pm
14.048 KB
28 Jul 2025 3.07 PM
root / root
0644
DirHandle.pm
1.52 KB
28 Jul 2025 3.07 PM
root / root
0644
Dumpvalue.pm
17.145 KB
28 Jul 2025 3.07 PM
root / root
0644
English.pm
4.649 KB
28 Jul 2025 3.07 PM
root / root
0644
FileCache.pm
5.441 KB
28 Jul 2025 3.07 PM
root / root
0644
FileHandle.pm
6.625 KB
28 Jul 2025 3.07 PM
root / root
0644
FindBin.pm
4.454 KB
28 Jul 2025 3.07 PM
root / root
0644
Internals.pod
2.516 KB
28 Jul 2025 3.07 PM
root / root
0644
Memoize.pm
35.344 KB
28 Jul 2025 3.08 PM
root / root
0644
NEXT.pm
18.404 KB
28 Jul 2025 3.07 PM
root / root
0644
PerlIO.pm
10.214 KB
28 Jul 2025 3.07 PM
root / root
0644
Safe.pm
24.494 KB
28 Jul 2025 3.07 PM
root / root
0644
SelectSaver.pm
1.051 KB
28 Jul 2025 3.07 PM
root / root
0644
SelfLoader.pm
17.277 KB
28 Jul 2025 3.08 PM
root / root
0644
Symbol.pm
4.687 KB
28 Jul 2025 3.07 PM
root / root
0644
Test.pm
29.353 KB
28 Jul 2025 3.08 PM
root / root
0644
Thread.pm
8.093 KB
28 Jul 2025 3.07 PM
root / root
0644
UNIVERSAL.pm
6.439 KB
28 Jul 2025 3.07 PM
root / root
0644
URI.pm
33.975 KB
9 Jan 2018 1.42 PM
root / root
0644
XSLoader.pm
11.003 KB
28 Jul 2025 3.07 PM
root / root
0644
_charnames.pm
32.389 KB
28 Jul 2025 3.07 PM
root / root
0644
autouse.pm
4.139 KB
28 Jul 2025 3.07 PM
root / root
0644
base.pm
10.723 KB
28 Jul 2025 3.07 PM
root / root
0644
blib.pm
2.037 KB
28 Jul 2025 3.07 PM
root / root
0644
bytes.pm
3.666 KB
28 Jul 2025 3.07 PM
root / root
0644
bytes_heavy.pl
0.74 KB
28 Jul 2025 3.07 PM
root / root
0644
charnames.pm
20.378 KB
28 Jul 2025 3.07 PM
root / root
0644
deprecate.pm
3.007 KB
28 Jul 2025 3.07 PM
root / root
0644
diagnostics.pm
18.592 KB
28 Jul 2025 3.07 PM
root / root
0644
dumpvar.pl
15.19 KB
28 Jul 2025 3.07 PM
root / root
0644
feature.pm
16.685 KB
28 Jul 2025 3.07 PM
root / root
0644
fields.pm
9.267 KB
28 Jul 2025 3.07 PM
root / root
0644
filetest.pm
3.909 KB
28 Jul 2025 3.07 PM
root / root
0644
if.pm
3.262 KB
28 Jul 2025 3.07 PM
root / root
0644
integer.pm
3.178 KB
28 Jul 2025 3.07 PM
root / root
0644
less.pm
3.129 KB
28 Jul 2025 3.07 PM
root / root
0644
locale.pm
4.741 KB
28 Jul 2025 3.07 PM
root / root
0644
meta_notation.pm
2.067 KB
28 Jul 2025 3.07 PM
root / root
0644
open.pm
7.833 KB
28 Jul 2025 3.08 PM
root / root
0644
overload.pm
52.064 KB
28 Jul 2025 3.07 PM
root / root
0644
overloading.pm
1.766 KB
28 Jul 2025 3.07 PM
root / root
0644
perl5db.pl
309.004 KB
28 Jul 2025 3.07 PM
root / root
0644
sigtrap.pm
7.428 KB
28 Jul 2025 3.07 PM
root / root
0644
sort.pm
5.938 KB
28 Jul 2025 3.07 PM
root / root
0644
strict.pm
4.627 KB
28 Jul 2025 3.07 PM
root / root
0644
subs.pm
0.828 KB
28 Jul 2025 3.07 PM
root / root
0644
utf8.pm
8.902 KB
28 Jul 2025 3.07 PM
root / root
0644
utf8_heavy.pl
30.874 KB
28 Jul 2025 3.07 PM
root / root
0644
vars.pm
2.357 KB
28 Jul 2025 3.07 PM
root / root
0644
vmsish.pm
4.212 KB
28 Jul 2025 3.07 PM
root / root
0644
warnings.pm
43.707 KB
28 Jul 2025 3.07 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF