#!/usr/bin/perl use IO::File; my $file = "yourFile.txt"; my $fh = IO::File->new($file); my $line = <$fh>; print $line;