my $textref = cat_files_ref( ... ); sub cat_files_ref { use File::Slurp; my $buffer = ""; for my $file ( @_ ){ read_file( $bin_file, buf_ref => \$buffer, { binmode => ':raw' } ) ; } return \$buffer; } sub cat_files_ref { use Path::Tiny; my $buffer = ""; for my $file ( @_ ){ $buffer .= path( $file )->realpath->slurp_raw; } return \$buffer; } sub cat_files_ref { use IO::All; my $content; for my $file ( @_ ){ $content << io($file); } return \$content; }
In reply to Re^3: concatenating text files before reading
by Anonymous Monk
in thread concatenating text files before reading
by Hossein
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |