SPUG: need gerror help

Yitzchak Scott-Thoennes sthoenna at efn.org
Wed Mar 9 09:19:06 PST 2005


On Wed, Mar 09, 2005 at 05:14:19PM +0550, Sachin Chaturvedi wrote:
> hi ,
> when i am executing a perl script , it tries to open a file named as 
> command.cmd . but when it tries to open it , it gives error like
> 
> GERROR file command.cmd can not be opened.
> 
> what does it mean and how can i remove it

It's not clear.  When the open() fails, an error code will be left in
the $! variable; usually that is printed with the error message, but
not in your case.  Change your script to say something like:

   open GERROR, "< command.cmd" or die "couldn't open command.cmd: $!";


More information about the spug-list mailing list