Getoptions(....); # Set output record separator $\="\r\n" if $dos_option; $\="\n" if $unix_option; ....