On Mon, 17 Jan 2005 17:57:28 +0000, RichT <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> time for me to ask dumb questions again...
>
> I have a script, what i want it to do is scan through a Cisco
> router Config file (nicely saved in a text file already so no need for
> and SNMP), then output it to a .csv file.
> I an using the Cisco::Reconfig; module to help me out.
>
> My problem is when i try to remove a charidge return from a
> variable, the value ends up blank, you will see from below i have
> tryed a few different ways to make this work, but i am lost (i suspect
> some basic Perl knowledge is missing).
> any help would be most appreciated thank you .
chomp($var); is perfectly valid.
Try this code:
> sub getPortFromFullInterface {
> my $part = shift;
print "I'm inside getPortFromFullInterface(), \$part is: $part\n";
> $part =~ s/^interface //g;
> $part =~ s/ point-to-point//g;
> $part =~ s/ multipoint//g;
chomp($part);
> return($part);
> };
Tor
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>