On Mon, 2009-01-26 at 15:07 -0800, mark.ma...@gdit.com wrote:
> My question is this – how can my ServiceRoutine in ServiceScript.pl
> get its own path? I would like to record this to the database for
> auditing purposes as well, to make sure no one is using a substitute
> version of ServiceRoutine
On Tue, 2009-01-27 at 12:27 -0500, Malyj, Mark wrote:
> Your code
>
> my ( $whoami ) = grep { m{ \b ServiceScript \. pl \b }msx } values %
> INC;
> print "$whoami\n";
>
> works great!! If you have time, could you explain to a Windows guy
> like
> me what the grep is doing?
See `perldoc -f grep`
Sorry, I had a typo. My code snippet above should have said:
require 'ServiceScript.pl';
my $svccmdline = "$uspname $uspparams";
$rtncode = ServiceRoutine($svccmdline, \...@rtndata);
- Marko
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h.
Shawn,
Your code
my ( $whoami ) = grep { m{ \b ServiceScript \. pl \b }msx } values %INC;
print "$whoami\n";
works great!! If you have time, could you explain to a Windows guy like
me what the grep is doing?
Yes, I know that someone could still spoof me, but this is my first line
of defense.
-