Help for this page

Select Code to Download


  1. or download this
    my @array = qw(some data you want to print to a file);
    open(my $fh, '>', '/path/to/a/text/file.txt') || die "could not open o
    +utput file : $!\n";
    print $fh @array;
    close($fh);
    
  2. or download this
    open(my $fh, '>>', '/path/to/a/text/file.txt') || die "could not open 
    +output file : $!\n";