All pastes #922968 Raw Edit

Anonymous

public text v1 · immutable
#922968 ·published 2008-02-29 03:44 UTC
rendered paste body
root@mong:/tmp# cat reads.pl 
#!/usr/bin/perl
use warnings; use strict;

open(data, "file");

while(<data>)
{
        my $char = getc data;
        print $char;
}
close(data);
root@mong:/tmp# ./reads.pl 
Unquoted string "data" may clash with future reserved word at ./reads.pl line 4.
Unquoted string "data" may clash with future reserved word at ./reads.pl line 8.
Unquoted string "data" may clash with future reserved word at ./reads.pl line 11.
Use of uninitialized value in print at ./reads.pl line 9, <data> line 1.