print <<"EOF"; EOF # to pass the here document as stdin to some system # command you could do this: open(CMD,"| command"); print CMD <<"END"; stuff.... END close(CMD);