in reply to Perl: how to insert words at the end of each line and open the file?
use warnings; use strict; while (my $line = <DATA>) { if ($line =~ /(\S+)/) { my $libn = "$1.lib"; print "$libn\n"; } } __DATA__ b05_ln_rmmm_0.85v_0.00c_core /p/ldb/ln/b05_ln_rmmm_0.85v_0.00c_core. +ldb:b05_ln_rmmm_0.85v_0.00c_core.ldb b05_nn__rmmm_g9v_098c_core /p/ldb/nn/b05_nn__rmmm_g9v_098c_core.ldb: +b05_nn__rmmm_g9v_098c_core b05_un_rsss_0.66v_0.44c_core /p/ldb/un/b05_un_rsss_0.66v_0.44c_core. +ldb:b05_un_rsss_0.66v_0.44c_core
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl: how to insert words at the end of each line and open the file?
by WWq (Novice) on Nov 01, 2013 at 02:39 UTC | |
by Anonymous Monk on Nov 01, 2013 at 02:48 UTC | |
by WWq (Novice) on Nov 01, 2013 at 08:19 UTC |