perl -pe 's/\@(.*?)\@/$ENV{$1}/g' < infile > outfile
EDIT:
To modify a particular file in-place, creating a backup of the original in somefile.bak
:
perl -i.bak -pe 's/\@(.*?)\@/$ENV{$1}/g' somefile
Delete the .bak
characters to avoid creating any backup file.