#!/usr/bin/perl use strict; use warnings; use Data::Dumper; my $filepath = 'C:\Program Files\Internet Explorer\ie9props.propdesc'; open my $fh, '<', $filepath or die "can't open '$filepath' $!"; my $file_contents = join '', <$fh>; print $file_contents;