Perl

[Perl/펄] file에 새로운 내용 추가하는 방법

Writing to a file use strict; use warnings; use Path::Class; use autodie; # die if problem reading or writing a file my $dir = dir(“/tmp”); # /tmp my $file = $dir->file(“file.txt”); # /tmp/file.txt # Get a file_handle (IO::File object) you can write to my $file_handle = $file->openw(); my @list = (‘a’, ‘list’, ‘of’, ‘lines’); foreach …

Continue Reading