I'm more or less guessing here - you did not include the format of your input file and your question is somewhat unspecific.

First a small remark on your code. The pattern match and substitution operators work on $_ implicitly when you don't specify a scalar variable. So your code simplifies to:

# just the relevant part next unless /560/; s/`/,/g;

Now supposing $string holds 'Object Name: \foo\bar\CISER\interesting' you can cut out the first part with: $string =~ s/^.*\\CISER/\\CISER/;Note that you have to escape the backslash. This replaces everything from the beginning of the string up to (and including) \CISER with \CISER - effectively leaving the part \CISER\interesting.

I hope this answers your question, otherwise post here in this thread a follow-up to clarify what you want to know.

-- Hofmator


In reply to Re: parse a log file by Hofmator
in thread parse a log file by Anonymous Monk

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.