amoura has asked for the wisdom of the Perl Monks concerning the following question:

Hello, do you know an easy way of doing this : my file has the following data :
nnn//elele/file/log.cxx:log_lu.cxx
nsn//els/fil/log.cxx:# log file
how can I capture only the first log.cxx I don't want to capture the second one b/c it is followed by # so I am trying to capture one log.cxx but not the one followed by :# ,,, thanks for ideas and tips .

edited: Tue Jul 9 04:46:11 2002 by jeffa - added pre tags

Replies are listed 'Best First'.
Re: capture strings
by Abigail-II (Bishop) on Jul 08, 2002 at 16:45 UTC
Re: capture strings
by frankus (Priest) on Jul 08, 2002 at 16:30 UTC
    Best to provide some sample data..
    Oh you did, use html tags to markup the question, then ;)

    nnn//elele/file/log.cxx:log_lu.cxx
    nsn//els/fil/log.cxx:# log file
    

    So something like;
    my @log_files= grep{ !/#/ }(<I>);

    --

    Brother Frankus.

    ¤