Stephen R. Scaffidi > Stem-0.12 > Stem::Util

Download:
Stem-0.12.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  5
Open  0
View/Report Bugs
Source  

Stem::Util ^

This file includes two subroutines: read_file and write_file.

read_file

read_file is a utility sub to slurp in a file.

It returns a list of lines when called in list context. It returns one big string when called in scalar context.

load_file

load_file is a utility sub to load a file of data. It reads in a file and converts it to an internal form according to the first line of the file. The default file format is Perl data and eval is used to convert it. These other formats are also supported:

        YAML

write_file

write_sub is a utility sub to write a file. It takes a file name and a list of strings. It opens the file and writes all data passed into the file. This will overwrite any data in the file.

syntax highlighting: