$file=IO::File->new('c:/scripts/002.txt'); # is the same of $file=IO::File->new('c:/scripts/002.txt','<'); #as open my $fh, 'c:/scripts/002.txt' or die "unable to open a file to read"; # equal to open my $fh, '<', 'c:/scripts/002.txt' or die "unable to open a file to read";