Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: Understanding Split and Join

by phamalda (Novice)
on Jan 29, 2016 at 19:18 UTC ( #1154016=note: print w/replies, xml ) Need Help??

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!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1154016]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2021-03-05 05:05 GMT
Find Nodes?
    Voting Booth?
    My favorite kind of desktop background is:

    Results (109 votes). Check out past polls.