use Modern::Perl;
use IO::All;
my $text < io('./czech-test.txt');
say $text;
And yes, IO::All is that simple, it takes care of all the low-level details and doesn't care if the source or destination of your operation is a file, an FTP server, HTTP(s), a socket, a pipe, a scalar variable, a database, ...It just Does the Right Thing.
CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
| [reply] [d/l] |