Hi All,

I am trying to read some data from af unix tape device. The have several files with 
"end of file markers". Can I read from tape devices at all?

I tried "open" on the device and this one reads all files on the tape into the first 
file and then hangs. Is it my code (I know the first loop is not very good:-) or does 
perl not recognise or honer the EOF marks?

Thanks,
Jakob


my $cnt = 0;
while (1 == 1) {
        open IN, "<", "/dev/nst0" || die "cant open ...\n";
        while (@out = <IN>) {
                $cnt++;
                open OUT, ">", "$cnt.bin" || die "cant open out\n";
                print OUT "@out\n";
                close OUT;
        }
}
close IN;

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to