In

my $action = $0 =~ /([^/]+)$/;

You need to escape your forward slash, and in this format, $action is given a true value ('1'), but is not given the result of the match.

The following works and is added to the code:

$0 =~ /([^\/]+)$/; my $action = $1;

Thanks for your comments.

J. J. Horner
Linux, Perl, Apache, Stronghold, Unix
jhorner@knoxlug.org http://www.knoxlug.org/

In reply to Re: Re: Service controller for Linux/Unix by jjhorner
in thread Service controller for Linux/Unix by jjhorner

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":