sub goo{ my $var = &file::foo(); system (`echo "var is $var" > ~/file`); }