issue with grep in the output of a command

I have a script that executes on a remote machine and fetched the output

The output saves in to a variable,I need to grep for a value so i can use it,the sample code is below

$logger->info("performing ssh to the swicth"); my $ssh = Net::OpenSSH->new($ip,user=>"$username",password=>"$password +",master_opts=>[-o =>"StrictHostKeyChecking=no"]); print"$display_message\n"; $logger->info("listing the current defined configuration of the switch + using cfgshow"); my($out,$err) = $ssh->capture2("cfgshow");
the $out contains the output of the cfgshow command the output in $out is
2015/07/25 23:01:48 Test1:pass cfgshow Defined configuration: cfg: FC_DVT MEZZI; MEZZI1 zone: MEZZI mezzi1; mezzi2; sanblaze zone: MEZZI1 mezzi3; mezzi4; sanblaze zone: vikash_enfield 10:00:00:00:c9:a1:95:aa; 10:00:00:00:c9:a1:95:ab; 20:00:00:11:0d:34:56:00 alias: mezzi1 10:00:00:00:c9:cd:cc:6c alias: mezzi2 10:00:00:00:c9:cd:cc:6d alias: mezzi3 10:00:00:90:fa:2e:dd:9f alias: mezzi4 10:00:00:90:fa:2e:dd:a0 alias: sanblaze 20:01:00:11:0d:34:57:00 Effective configuration: cfg: FC_DVT zone: MEZZI 10:00:00:00:c9:cd:cc:6c 10:00:00:00:c9:cd:cc:6d 20:01:00:11:0d:34:57:00 zone: MEZZI1 10:00:00:90:fa:2e:dd:9f 10:00:00:90:fa:2e:dd:a0 20:01:00:11:0d:34:57:00
i need to grep for FC_DVT into anther variable,please help on how to do it I need a variable to contain only "FC_DVT" i dont need other values

In reply to issue with grep in the output of a command by janasec

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.