- or download this
# Write to text file:
open(my $fh, ">", $filename)
...
my $line = <$fh>; # Reads a line.
chomp $line; # Removes eol chars (CR,LF)
close $fh;
- or download this
perl -e 'open($fh, ">", "tst") or die "$!"; print $fh "XX\n"; close $f
+h;'
- or download this
perldoc -f open
perldoc perldoc
perldoc perlrun
perldoc Tk # (Added as Edit.)