S
Steve D
$file_name = 'EMASTER_Z';
if (-B $file_name) {
print "$file_name - is a binary file\n";
}
if (-T $file_name) {
print "$file_name - is a text file\n";
}
open (MASTER_IN, "<$file_name") ||
die "unable to open $file_name file $!";
binmode(STDOUT);
binmode(MASTER_IN);
print "\n----------------- 0 ----------------------\n";
### lets me see the file as it is
print STDOUT <MASTER_IN>;
print "\n----------------- 1 ----------------------\n";
### place data into variable or array
### goal is to capture all text data but no matter what I do nothing
works
### have tried unpack but I do not fully understand it
@master_array = <MASTER_IN>;
chomp @master_array;
$var = pop(@master_array);
print STDOUT $var;
print "--------- done -----------\n";
## what am I doing wrong, or do not understand"
# thanks in advance
if (-B $file_name) {
print "$file_name - is a binary file\n";
}
if (-T $file_name) {
print "$file_name - is a text file\n";
}
open (MASTER_IN, "<$file_name") ||
die "unable to open $file_name file $!";
binmode(STDOUT);
binmode(MASTER_IN);
print "\n----------------- 0 ----------------------\n";
### lets me see the file as it is
print STDOUT <MASTER_IN>;
print "\n----------------- 1 ----------------------\n";
### place data into variable or array
### goal is to capture all text data but no matter what I do nothing
works
### have tried unpack but I do not fully understand it
@master_array = <MASTER_IN>;
chomp @master_array;
$var = pop(@master_array);
print STDOUT $var;
print "--------- done -----------\n";
## what am I doing wrong, or do not understand"
# thanks in advance