$ perl -e 'system "echo @{[`date` =~ /^(\w+)/]} > test.txt"'