$ perl use Shell qw( echo ); my $var = 'hallo welt'; echo "$var >> test.txt"; $ cat test.txt hallo welt