head     1.1;
branch   1.1.1;
access   ;
symbols  start:1.1.1.1 webdox:1.1.1;
locks    ; strict;
comment  @# @;


1.1
date     2003.03.15.00.57.44;  author redpain;  state Exp;
branches 1.1.1.1;
next     ;

1.1.1.1
date     2003.03.15.00.57.44;  author redpain;  state Exp;
branches ;
next     ;


desc
@@



1.1
log
@Initial revision
@
text
@#! /usr/bin/perl

# A version of cat written in perl.

use strict qw(refs vars);
use FileHandle;

binmode STDOUT;

my $buf = chr(0) x 1024;

my $file;
while ( ($file = shift @@ARGV) ) {
    my $fh = new FileHandle("<$file");
    (defined $fh) || die "Couldn't open $file: $!\n";
    binmode $fh;

    my $n;
    while ( ($n = sysread($fh, $buf, 1024)) > 0 ) {
	syswrite( STDOUT, $buf, $n );
    }
    $fh->close();
}
@


1.1.1.1
log
@Project Start
@
text
@@
