in reply to PIPE less

Open to a pipe:

open($f,'|-','less') or die "Error: Could not help"; print $f "hi"; close $f;

More information about this you can find with "perldoc -f open"