The method mentioned is to get the output while u are running the perl files at the shell prompt not in the code.. if u want to save the log details after the perl files are processed then use this function
sub file_write { $_file = shift; $_data = shift; open FILE,">$_file"; print FILE $_data; close FILE; chmod(0777, "$_file"); } Chaitanya On Tue, Oct 5, 2010 at 7:27 PM, Jyoti <jcutiep...@gmail.com> wrote: > Sorry doesnt work. > > Error is : > > Can't locate object method "perl" in 'filename'... > > Also > > 2010/10/5 Jeff Peng <pen...@nsbeta.info> > > > > Hello, > > > > > > Can anyone please tell me how to save output (what we get after running > a > > > perl script) as an external file? > > > > > > > run it under a unix shell? > > try: > > > > perl a.pl > a.txt 2>&1 > > > > save all the output of a.pl to a.txt. > > > > 2>&1 means to capture the script's error output also. > > > > >