#!/usr/bin/perl use strict; use warnings; use Tie::File; my $mac = "this is the variable to be written to a file"; # tie array to output file tie my @array, 'Tie::File', "outputfile.txt" or die "can't open file: +$!"; # write $mac to file push @array, $mac; # all finished untie @array; __END__
In reply to Re: Output to file question
by beable
in thread Output to file question
by dannyp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |