So, to paraphrase what Fletch so ably said, picture this: you've sent your spouse off to get something at Home Depot; you're at home painting. The phone rings .. it's your spouse, and they need directions.
Hi, I'm calling from the highway, how do I get to Home Depot?
You, of course, are puzzled .. you turn left at the end of your street, follow the road as it curves past the convenience store/gas station, go over the Leaside bridge and turn right just past the DEL building.
You don't even know what highway your spouse is on, or what direction they're headed in. How can you possibly give them directions with so little information to go on?
So that's the bind that I see some people in when they post questions .. they know what they want to do (that's an improvement over some people, believe me), but they're getting 'an error'. Well, the error could be one of a dozen things, each of which has its own solution.
We're also handicapped because we can't see what's on your screen -- we're relying on you to do that for us, just like you need your spouse to tell you what highway they're on, what direction they're going, what signs they're going past, and what store they think they're going to.
We may be bright, and quite good at Perl, but we're not all-seeing. Tell us what you've tried, what worked and what didn't work -- and why you think it didn't work. If there are error messages, list them all -- often, you just have to know what the error messages mean, rather than what they're saying.
Honey, are you there? I'm just pulling your leg -- I'm in the parking lot at the Home Depot, got here no problem. They've got a special on chain saws, want me to pick you up one?
Alex / talexb / Toronto
"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds
Update: Correct two typos.
Well, looking at the error message you're getting . . . erm.
So anyhow, looking at the code that's giving you problems . . .
Well . . . erm . . . it must be sunspot activity. Yeah, that's the ticket.
In addition to what philcrow said, the program being run in the shell command needs to be findable and readable by the web-server user account. Have you tried using the absolute path to the command, rather than just the command name?
As Fletch points out, you really should show us the relevant details. Common mistakes like the one(s) you are making are easy enough to guess at, but really pointing out the right way to do something is just about impossible without having some details.
This is usually an issue with permissions. The web server does not have the permissions you have when you run it at the command line. The script needs to be executable by the user the server runs as.