写个备份脚本?大虾们帮我看一下.谢谢.

写个备份脚本?大虾们帮我看一下.谢谢.

我这是要备份一个数据库.我想用perl来写个脚本来让它自己每个星期都备份一次.
对于perl脚本我是新手.所以有很多还是不明白.我是这些写的
#!/usr/bin/perl
$>=getpwnam("postgres" );
system("pg_dump","english",">","/backup/日期.sql" ) ;
system("pg_dump","english2",">","/backup/english2.sql" ) ;
因为以前我这有人写过一些perl的脚本.所以我就参照一些.结果就出现了以下的错误
Bareword found where operator expected at ./1.sh line 2, near "$>getpwdnam"
        (Missing operator before getpwdnam?)
syntax error at ./1.sh line 2, near "$>getpwdnam"
Execution of ./1.sh aborted due to compilation errors.
所以我想请教一下高手,我需要怎样改?还有我想在/backup/日期.sql日期这个变量需要怎样来设置呢?因为pg_dump必须要有那个文件的时候才能pg_dump到那里.请高手指教
system
pg_dump","english",">","/backup/日期.sql
--->
"/pathofpg_dump/pg_dump english > /backup/日期.sql"

然後检查^M有没有附在最後面...如果有
请把他们全部消去.....
可以用vi
that's all