in reply to read(x,y,z)
Note that read operates on a file-handle, not a file name. These need to be opened:my $file = "foo.txt"; my $data; read($file, $data, 1024);
If you're feeling more progressive, you might try and use IO::Handle instead of the read anachronism.my $file = "foo.txt"; open ($fh, $file) || die "Could not open file $file\n"; my $data; read($fh, $data, 1024);
|
|---|