#!/usr/bin/perl use strict; use warnings; my $file = '/path/file.txt'; my $content = do{local (@ARGV,$/) = $file; <>}; print $content;