I am trying to return the output of a file replacing newlines with \n without using CPAN
Here is what I have so far
#! /usr/local/bin/perl
if ( $#ARGV = "1" ) {
print "$ARGV[0]\n";
my $file = "$ARGV[0]";
my $document = do {
local $/;
open my $fh, "<", $file
or die "could not open $file: $!";
<$fh>;
};
print "Doc: $document\n";
}