the problem with that is undef opens a temporary file
:) its http://search.cpan.org/perldoc/Dancer::FileUtils#read_file_content
sub open_file { my ( $mode, $filename ) = @_; open my $fh, $mode, $filename or raise core_fileutils => "$! while opening '$filename' using m +ode '$mode'"; return set_file_mode($fh); } sub read_file_content { my $file = shift or return; my $fh = open_file( '<', $file ); return wantarray ? read_glob_content($fh) : scalar read_glob_content($fh); }
In reply to Re^2: Wrong idioms (open $fh, '<', undef)
by Anonymous Monk
in thread Wrong idioms
by McA
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |