in reply to Removing everything before the first comma separator on each line of a text file
If you just want to unconditionally remove everything before the first comma, I'd suggest using split, like this:
while (my $line = ..datasource..) { my ($first, $rest) = split /,/, $line, 2; print $OFH $rest; }
Update: Removed erroneous comma after $OFH, thanks to Tux.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Removing everything before the first comma separator on each line of a text file
by Tux (Canon) on Sep 16, 2014 at 06:21 UTC | |
by soonix (Chancellor) on Sep 16, 2014 at 07:37 UTC |