I've some values stored in the variables $a,$b,$c.
Now I've to load these values into new file (create file & load).
I'm new to Perl, how can I do it?
How to create a new file in Perl?
32.7k Views Asked by Jackie James At
3
There are 3 best solutions below
0
On
Have a look at the methods LoadFile and DumpFile of the YAML module. They are very easy to use as you just need to throw a filename and the actual data against them.
Ask specific questions if don't get along with these.
0
On
Another option: File::Slurp provides convenient read_file and write_file functions
write_file('/path/file', @data);
You should read perlopentut and Beginner Perl Maven tutorial: Writing to files.