K2LL33D SHELL

 Apache/2.4.7 (Ubuntu)
 Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64
 uid=33(www-data) gid=33(www-data) groups=33(www-data)
 safemode : OFF
 MySQL: ON | Perl: ON | cURL: OFF | WGet: ON
  >  / usr / share / perl / 5.18.2 / Tie /
server ip : 172.67.156.115

your ip : 172.70.100.84

H O M E


Filename/usr/share/perl/5.18.2/Tie/StdHandle.pm
Size1.31 kb
Permissionrw-r--r--
Ownerroot : root
Create time27-Apr-2025 10:10
Last modified21-Nov-2018 01:11
Last accessed06-Jul-2025 11:57
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
package Tie::StdHandle;

use strict;

use Tie::Handle;
use vars qw(@ISA $VERSION);
@ISA = 'Tie::Handle';
$VERSION = '4.3';

=head1 NAME

Tie::StdHandle - base class definitions for tied handles

=head1 SYNOPSIS

package NewHandle;
require Tie::Handle;

@ISA = qw(Tie::Handle);

sub READ { ... } # Provide a needed method
sub TIEHANDLE { ... } # Overrides inherited method


package main;

tie *FH, 'NewHandle';

=head1 DESCRIPTION

The B<Tie::StdHandle> package provide most methods for file handles described
in L<perltie> (the exceptions are C<UNTIE> and C<DESTROY>). It causes tied
file handles to behave exactly like standard file handles and allow for
selective overwriting of methods.

=cut

sub TIEHANDLE
{
my $class = shift;
my $fh = \do { local *HANDLE};
bless $fh,$class;
$fh->OPEN(@_) if (@_);
return $fh;
}

sub EOF { eof($_[0]) }
sub TELL { tell($_[0]) }
sub FILENO { fileno($_[0]) }
sub SEEK { seek($_[0],$_[1],$_[2]) }
sub CLOSE { close($_[0]) }
sub BINMODE { binmode($_[0]) }

sub OPEN
{
$_[0]->CLOSE if defined($_[0]->FILENO);
@_ == 2 ? open($_[0], $_[1]) : open($_[0], $_[1], $_[2]);
}

sub READ { &CORE::read(shift, \shift, @_) }
sub READLINE { my $fh = $_[0]; <$fh> }
sub GETC { getc($_[0]) }

sub WRITE
{
my $fh = $_[0];
print $fh substr($_[1],0,$_[2])
}


1;