david2008 has asked for the wisdom of the Perl Monks concerning the following question:
Hi all,
I have the following script a.pl
When i run it on linux it works, but on solaris i get an error message in the read command.use strict; use warnings; my ($output_file) = 'a.exe'; open INPUT, $output_file or die "Cannot read the installer fil +e $output_file: $!"; binmode INPUT; my $content = ""; my $buffer; while ( read (INPUT, $buffer, 65536) # read in (up to) 64k +chunks, write ) { if ($!){die $!} $content.=$buffer; }; die "Cannot read the installer file $output_file: $!" if $! && + ($! ne 'Bad file descriptor'); close INPUT; return $content;
What can be the reason? Thanks, DavidBad file number at a.pl line 13.<br>
Back to
Seekers of Perl Wisdom