|
|
Back to UserFriendly Strip Comments Index
| perl problem. |
by colonele |
2002-06-07 09:12:11 |
The version: "This is perl, v5.6.1 built for i386-linux".
The problem:
I'm building a simplistic shell program (bash-frontend) for perl using the system call. The exact line of code where I use it is:
system($_) && warn "Command Not Found \n";
Now I realize that && is not the normal operator, but it seems to work, so that's good. What doesn't seem to work is when I type in a bad command:
Can't exec "dp": No such file or directory at psh.pl line 27, <STDIN> line 2.
Command Not Found
or whatever. Why is the error message not being suppressed? How can I fix that? I'll post the complete program (it's not that long (29 lines) ... yet.) I hope to eventually have perl interrupts and implement the various perl-style expressions, but until then... this is my "dev1" version of the script: that is to say, it's not even 0.0.1 yet. 0.0.1 implies that it actually has functionality at some level.
Any help is appreciated. If this bug has been fixed in more recent versions of perl, that's good too.
On a final note: is it possible to compile perl programs into seperate binaries that don't require perl? Even if it makes it so that perl is included in the binary, that's fine too. |
|
[ Reply ] |
|
system() | by SMcV | 2002-06-07 09:41:53 |
|
i think | by nimdokk | 2002-06-07 11:44:28 |
|
barring more info | by nimdokk | 2002-06-07 14:47:02 |
|
Compiling Perl | by ptkdb | 2006-11-19 12:55:59 |
|
|
[Todays Cartoon Discussion]
[News Index]
|
|