in reply to parse a log file
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
|
|---|