To print text to a file, including to STDOUT, you use the print function.
The print function has these forms:
print FILEHANDLE LIST
If you don't specify a file handle, STDOUT is used.
If you don't specify a list of items to print, the print function prints whatever is in the special Perl variable $_ to the output channel.
The $_ variable is the default variable that holds input from the input channel.