Start Stop Restart

I'm wondering how I should make a script that can start, stop, and restart another script.
What I need to be able to do, is start and stop a perl script from the command line. The easiest way of doing this seems to be to have another script, starting and stopping the other script. I have BASH, DASH, KSH, PERL installed.
Does anyone have any ideas?

have a look at the runlevel scripts in /etc/init.d; /etc/rcx.d (depends on your os!). these scripts are doing exactly what you want to do...

well, I don't even have those, since i have ubuntu. I think its init.d in ubuntu. I'll try and find a simple one.

Ok, i'm really confused.
I just haven't spent enough time scripting to be able to do complex tasks.
I don't want to ask too much of you, but let's say I want it to control the script
/home/bakes/control.sh ?
does anyone feel like making an example for me?

there are runlevel scripts in ubuntu... but i've only an old version to look at (6.06). i've posted you the crond start/stop script.

#!/bin/sh
# Start/stop the cron daemon.
#
### BEGIN INIT INFO
# Provides:          cron
# Required-Start:    $syslog $time
# Required-Stop:     $syslog $time
# Default-Start:     2 3 4 5
# Default-Stop:      S 0 1 6
# Short-Description: Regular background program processing daemon
# Description:       cron is a standard UNIX program that runs user-specified 
#                    programs at periodic scheduled times. vixie cron adds a 
#                    number of features to the basic UNIX cron, including better
#                    security and more powerful configuration options.

### END INIT INFO


test -f /usr/sbin/cron || exit 0

#LSBNAMES='-l'  # Uncomment for LSB name support in /etc/cron.d/

. /lib/lsb/init-functions

case "$1" in
start)	log_begin_msg "Starting periodic command scheduler..."
        start-stop-daemon --start --quiet --pidfile /var/run/crond.pid --name cr
on --startas /usr/sbin/cron -- $LSBNAMES
        log_end_msg $?
	;;
stop)	log_begin_msg "Stopping periodic command scheduler..."
        start-stop-daemon --stop --quiet --pidfile /var/run/crond.pid --name cro
n
        log_end_msg $?
        ;;
restart) log_begin_msg "Restarting periodic command scheduler..."
        start-stop-daemon --stop --retry 5 --quiet --pidfile /var/run/crond.pid 
--name cron
        start-stop-daemon --start --quiet --pidfile /var/run/crond.pid --name cr
on --startas /usr/sbin/cron -- $LSBNAMES
        log_end_msg $?
        ;;
reload|force-reload) log_begin_msg "Reloading configuration files for periodic c
ommand scheduler..."
	# cron reloads automatically
        log_end_msg 0
        ;;
*)	log_success_msg "Usage: /etc/init.d/cron start|stop|restart|reload|force
-reload"
        exit 1 
        ;;
esac
exit 0

at least that one's smaller than the apache one i was looking at!

I can honestly make no sense of that, I'm dyslexic and unless it's laid out really well, I just find it semi-impossible. As well as that, i'm not entirely sure what this does, other than calling start-stop-daemon to kill/start the process

ok, i've got my script going. Thanks for the help!