This should give you what you need

#=====START========================
#!/usr/bin/perl -wT

package esmith;

use esmith::config;
use esmith::util;

my %conf;
tie %conf, 'esmith::config';

print 
esmith::util::computeLocalNetworkShortSpec($conf{'LocalIP'},$conf{'LocalNetmas
k'}) ."\n";
#=====END========================

>===== Original Message From [EMAIL PROTECTED] =====
>> <new lines>
>> my %conf;
>> tie %conf, 'esmith::config';
>> my $LocalIP = db_get(\%conf, 'LocalIP');
>> </new lines>
>> my ($A, $B, $C, $D) = split(/\./, $LocalIP);
>> my $mask = "$A\.$B\.$C\/";     <--------------take out "\/"
>> print $mask;
>
>
>Keith, you da MAN! :)
>
>Here's the final snippet as modified so that the output is what was needed:
>
>var HOME_NET [127.0.0.1/32,{
>my %conf;
>tie %conf, 'esmith::config';
>my $LocalIP = db_get(\%conf, 'LocalIP');
>my ($A, $B, $C, $D) = split(/\./, $LocalIP);
>my $mask = "$A\.$B\.$C\.0/24";
>},{$ExternalIP}/32]
>
>This yields output of the following once the template has been expanded:
>
>var HOME_NET [127.0.0.1/32,192.168.1.0/24,24.85.12.224/32]
>
>A million thank-you's Keith. And an extra one just because :)
>
>Cheers!
>Ari
>
>--
>Please report bugs to [EMAIL PROTECTED]
>Please mail [EMAIL PROTECTED] (only) to discuss security issues
>Support for registered customers and partners to [EMAIL PROTECTED]
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>Archives by mail and http://www.mail-archive.com/devinfo%40lists.e-smith.org

Placido Sanchez
[EMAIL PROTECTED]
[EMAIL PROTECTED]
www.geocities.com/lapsch


--
Please report bugs to [EMAIL PROTECTED]
Please mail [EMAIL PROTECTED] (only) to discuss security issues
Support for registered customers and partners to [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Archives by mail and http://www.mail-archive.com/devinfo%40lists.e-smith.org

Reply via email to