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
    Welcome to the Monastery, phamalda!

    Could you please repost this in Seekers of Perl Wisdom? I understand why you asked this here, but you'll get a wider audience if you post the question in the proper location.

      Okay, thank you so much. I appreciate it. Sorry about that. Pham
        No worries. Glad you're here, and thanks!