#!/usr/bin/perl use warnings; use strict; open(LOG, "source.txt") or die "Error: $!"; my @lines = <LOG>; close(LOG); my $cnt = 0; foreach my $line (@lines) { $cnt++; $line =~ m/(\d+\s+)(.+)/; $lines[$cnt] = "$1 (Birthday) $2 - singer"; } open(LOG, "> source2.txt") or die "Error $!"; print LOG join("\n", @lines); close(LOG);
In reply to Re: small regex help
by sulfericacid
in thread small regex help
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |