in reply to Re^3: Cutting last word from a output line
in thread Cutting last word from a output line

Thank you all, this is all i wanted to know :)
############################################### my $output = `nnmsnmpwalk.ovpl -u system -p manager123 -t 10 -c $Strin +g $IP sysName`; my $sysName = (split /\s/, $output)[-1]; print "system name is $sysName\n";
THanks, Bharath

Replies are listed 'Best First'.
Re^5: Cutting last word from a output line
by karlgoethebier (Abbot) on Feb 28, 2015 at 18:44 UTC

    Are you sure?

    Regards, Karl

    «The Crux of the Biscuit is the Apostrophe»

      Yes Karl, Thank you so much for your efforts. And sorry for dirty post framing. Could'n get how to parenthesize the post using HTML.
        "Could'n get ... using HTML."

        You can try it in your private scratchpad:

        <p>...your specs/problems...</p>

        <p>...what you did...</p>

        <c>...some code...</c>

        <p>...your question(s)...</p>

        <p>... blame/flame stuff etc. and perhaps some regards</p>

        This should render like this (less or more):

        ...your specs/problems...

        ...what you did... (code unchanged but formatted using Perltidy)

        $output = `nnmsnmpwalk.ovpl -u system -p manager123 -t 10 -c $String $IP sysNa +me`; my $sysName = ( split /\s/, $output ) - 1; print "system name is $sysName\n";

        ...your questions(s)...

        ... blame/flame stuff etc. and perhaps some regards

        See also:

        Best regards, Karl

        «The Crux of the Biscuit is the Apostrophe»