This command works properly to write the results to the file "oneMonthDataOnlyfile.txt"

```
system("/usr/bin/sed -e '1,3d' " . "oneMonthData.txt" ." > oneMonthDataOnly.txt" );

```

Can I do the redirect to a here-doc, e.g.:

```
system("/usr/bin/sed -e '1,3d' " . "oneMonthData.txt" . ">  $myData);

```

When I try with the above formatting I get "parenthesis expected"

or with`system("/usr/bin/sed -e '1,3d' " . "oneMonthData.txt" ." > $myData " );`
sh: $myData: ambiguous redirect
ambiguous redirect

or: `system("/usr/bin/sed -e '1,3d' " . "oneMonthData.txt" > $myData);`
 throws: "Column number or datablock line expected

Am I getting the formatting wrong or can a here-doc not be populated this way?