Run a perl script from golang with IO

I recently asked this question, but it did not allow me to send data to perl. I was able to retrieve data using cmd.Stdout, but how can i send stdin?

This is my code: Go:

package main

import "io"
import "os/exec"
import "bytes"
import "fmt"

func main() {
  cmd := exec.Command("perl", "")

  stdin, _ := cmd.StdinPipe()

  var out bytes.Buffer
  Cmd.Stdout = &out

  io.WriteString(stdin, "test")

  _ = cmd.Run()

  output := out.String()

  fmt.Println(output) //does not print "test", instead it prints ""


# usr/bin/perl

print $ARGS[0];