Help for this page

Select Code to Download


  1. 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;
    
  2. or download this
    perl -e 'open($fh, ">", "tst") or die "$!"; print $fh "XX\n"; close $f
    +h;'
    
  3. or download this
    perldoc -f open
    perldoc perldoc
    perldoc perlrun
    perldoc Tk      # (Added as Edit.)