suvendra123 has asked for the wisdom of the Perl Monks concerning the following question:
Thankswhile ( my $line = <$in_fh> ) { if (my ($abc) = $line =~ m{ \A (.*dgrs) }xms) { print $temp_out "$abc . _$_;\n" for 1..3; } else { print $temp_out $line; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to combine string and digits in perl (updated x2)
by AnomalousMonk (Archbishop) on Mar 17, 2021 at 01:13 UTC | |
by suvendra123 (Initiate) on Mar 17, 2021 at 09:11 UTC | |
by AnomalousMonk (Archbishop) on Mar 17, 2021 at 19:59 UTC | |
|
Re: How to combine string and digits in perl
by hippo (Archbishop) on Mar 17, 2021 at 09:30 UTC | |
|
Re: How to combine string and digits in perl
by 1nickt (Canon) on Mar 17, 2021 at 01:44 UTC | |
|
Re: How to combine string and digits in perl
by davido (Cardinal) on Mar 17, 2021 at 13:48 UTC |