Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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 (Abbot) 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.

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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1154016]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2018-04-23 02:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?