die problem?

G

g4173c

Hi:

I have the following code:

#
# First Check out the File...
#
system ("cleatool co -unr -nc $revfilename") || die "Error:
Couldn't Check Out $revfilename: $!\n";
#
# Open File, find the REV variable name and increament...
#
open (REVFILE, "+<$revfilename") || die "Couldn't Open File
$revfilename: $!\n";


The system call has a typo for the command. I thought that it should
have stopped there, however I get this:

Can't exec "cleatool": No such file or directory at ba line 83,
<ALTERA> line 6.
Couldn't Open File pkg.vhd: Permission denied

What am I doing wrong? Shouldn't it have exited on the cleatool error?

Thanks for any help in advance!
Tom
 
J

John W. Krahn

I have the following code:

#
# First Check out the File...
#
system ("cleatool co -unr -nc $revfilename") || die "Error:
Couldn't Check Out $revfilename: $!\n";
#
# Open File, find the REV variable name and increament...
#
open (REVFILE, "+<$revfilename") || die "Couldn't Open File
$revfilename: $!\n";


The system call has a typo for the command. I thought that it should
have stopped there, however I get this:

Can't exec "cleatool": No such file or directory at ba line 83,
<ALTERA> line 6.
Couldn't Open File pkg.vhd: Permission denied

What am I doing wrong? Shouldn't it have exited on the cleatool error?

No.

perldoc -f system



John
 
T

Tad McClellan

Purl Gurl said:
g4173c wrote:





Your system call is successful. An error message is returned to
your call,


No it isn't.

which is success. Your argument "cleatool" is incorrect
but your "system" call successfully runs and completes; no system
error code is returned.


Yes it is.

perl -le '$ret = system "bad"; print $ret'

-1
 
T

Tad McClellan

Purl Gurl said:
My presumption is you are not wearing your reading glasses
rather than your usual habit of lying to readers.


My presumption is that you do not know the difference between
a function's "return value" and "output".

"Can't exec "cleatool": No such file or directory at ba line 83"
Nah, this is not a problem


That is output, it is not a return value as you said it was.

Irrelevant.


It illustrates that system *does* return an error code.

All you have accomplished is to exemplify how
childish are you.


All you have accomplished is to illustrate that you do not know
what you are talking about. Yet again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,233
Members
46,820
Latest member
GilbertoA5

Latest Threads

Top