Bio::Gonzales::Util::File - Utility functions for file stuff
use Bio::Gonzales::Util::File qw(glob_regex expand_path slurpc basename open_on_demand is_newer);
Opens the file if $filename_or_fh is a filename or returns $filename_or_fh if it is already a filehandle, that is opened.
$filename_or_fh
Opens the file $filename and returns an handle to it.
$filename
Return true if $b does not exist or $a is newer than $b. Dies if $a does not exist.
$b
$a
Returns the basename of $file in scalar context and the ( $dir, $basename, $suffix ) in list context. Filename example:
$file
$dir
$basename
$suffix
/path/to/file.txt scalar basename: 'file' list basename: ('path/to', 'file', 'txt')
Expands ~ in all supplied files and returns the crap.
Selects files from $dir based on the supplied $file_regex.
$file_regex
Splits a $path into directory and filename.
jw bargsten, <joachim.bargsten at wur.nl>
<joachim.bargsten at wur.nl>
To install Bio::Gonzales, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bio::Gonzales
CPAN shell
perl -MCPAN -e shell install Bio::Gonzales
For more information on module installation, please visit the detailed CPAN module installation guide.