in reply to Understanding Split and Join
First and foremost, thank you guys for the unending information. Great stuff! I am working on a script that splits a line into an array delimited by tildes. I need to completely remove a couple of those resulting fields if there is a way to do that. This is rather than removing them based on the regular expressions identified. Below is the piece of code that does that:
my @field = split("~", $line); if ($field[11] eq '000015') { $line =~ s/$field[12]/92/g; $line =~ s/~~~~~~~~~10~/~10~/g; push(@newlines,$line); }
I'd really appreciate your advice on this. Thanks in advance.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Understanding Split and Join
by stevieb (Canon) on Jan 29, 2016 at 21:44 UTC | |
by phamalda (Novice) on Jan 29, 2016 at 22:05 UTC | |
by stevieb (Canon) on Jan 29, 2016 at 22:08 UTC |
In Section
Tutorials