http://www.perlmonks.org?node_id=180467

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

hello , I got this data in my file
nbsssbs/cn/bld/cn.bld:cn_commonsw_libs.bld nbsssbs/cn/bld/cn_commonsw_libs.bld:# File: cn_commonsw_libs.bld
I would like to capture the .bld , I want
$hold1 = cn.bld; $hold2 = cn_commonsw_libs.bld;
the problem I am having is , I am trying to avoid the .bld followed by :# in the second line .. , I just need to pare line like the first one
cn.bld:cn_commonsw_libs.bld
thanks for helps and ideas

2002-07-09 Edit by Corion : Added formatting