Re: [SLUG] Perl Question

From: Dylan Hardison (dylanwh@gmail.com)
Date: Tue Mar 22 2005 - 16:22:34 EST


On Tue, 22 Mar 2005 15:29:23 -0500 (EST), mark@bish.net <mark@bish.net> wrote:
>
> Why doesn't this work?
>
> open(SRC, "<$file1") or die "Can't open for reading: $!\n";
> open(DEST, ">$file2") or die "Can't open for reading: $!\n";
>
> binmode(SRC);
> binmode(DEST);
>
> while(read(BRIEF, $buff, 2)){
> $buff = hex ($buff) ^ 0xAA;
> print DEST $buff;
> }
>
> close(DEST);

use strict;
use warnings;
my $file1 = "something";
my $file2 = "something else";
my $buff;

That should help you spot errors. :)
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 16:19:59 EDT